Skip to content

Commit 4e7a7a9

Browse files
committed
Change path filtering in python path discovery
1 parent 20fd43d commit 4e7a7a9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/renderer/search_emme_pythonpath.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ const listEMMEPythonPaths = () => {
9191
}
9292
});
9393
if (pythonInstallations.length > 0) {
94-
return [true, pythonInstallations];
94+
// Filter out duplicates
95+
const filteredPythons = _.uniq(pythonInstallations).filter(filteredPath => {
96+
return !filteredPath.startsWith('\\');
97+
});
98+
return [true, filteredPythons];
9599
} else {
96100
return [false, null];
97101
}
@@ -140,10 +144,6 @@ function hasPythonEnv(basePath) {
140144
console.log(e);
141145
}
142146
}
143-
// Filter out duplicates
144-
const filteredPaths = _.uniq(exePaths).filter(filteredPath => {
145-
return !filteredPath.startsWith('\\');
146-
});
147147
return filteredPaths;
148148
}
149149

0 commit comments

Comments
 (0)