Skip to content

Commit 328b0e0

Browse files
committed
Refactor path discovery logic
1 parent fc11d27 commit 328b0e0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/renderer/search_emme_pythonpath.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,14 @@ function hasPythonEnv(basePath) {
120120
if(subPath.startsWith("Emme")) {
121121
const emmeVersionFolder = path.join(basePath, subPath);
122122
const emmeVersionFolderContents = fs.readdirSync(emmeVersionFolder);
123-
124-
console.log(emmeVersionFolderPathFiles);
125-
console.log(emmeVersionFolderContents);
126-
127123
emmeVersionFolderContents.forEach(emmeFolderPath => {
128124
if(emmeFolderPath.startsWith("Python")) {
129125
const pythonFolderPath = path.join(emmeVersionFolder, emmeFolderPath);
130126
const pythonPathFiles = fs.readdirSync(pythonFolderPath);
131127
pythonPathFiles.forEach(fileName => {
132128
if(fileName === 'python.exe') {
133-
exePaths.push(path.join(pythonFolderPath, fileName));
129+
const pythonExecutablePath = path.join(pythonFolderPath, fileName);
130+
exePaths.push(pythonExecutablePath);
134131
}
135132
})
136133
}
@@ -140,6 +137,7 @@ function hasPythonEnv(basePath) {
140137
}
141138
catch(e) {
142139
console.log(`Error traversing path ${basePath}`);
140+
console.log(e);
143141
}
144142
}
145143
return exePaths;

0 commit comments

Comments
 (0)