Skip to content

Commit

Permalink
Fix python selection
Browse files Browse the repository at this point in the history
Signed-off-by: paulober <[email protected]>
  • Loading branch information
paulober committed Sep 11, 2024
1 parent 76f02d0 commit 3cb62ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/webview/newMicroPythonProjectPanel.mts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ export class NewMicroPythonProjectPanel {
let python3Path: string | undefined;
if (process.platform === "darwin" || process.platform === "win32") {
switch (data.pythonMode) {
// TODO: add a simpler option, maybe to select via python extension api
case 0:
python3Path = data.pythonPath;
break;
case 1:
python3Path = process.platform === "win32" ? "python" : "python3";
break;
Expand Down
2 changes: 1 addition & 1 deletion web/mpy/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ var submitted = false;
let pythonPath = null;
for (let i = 0; i < pythonVersionRadio.length; i++) {
if (pythonVersionRadio[i].checked) {
pythonMode = pythonVersionRadio[i].value;
pythonMode = Number(pythonVersionRadio[i].value);
break;
}
}
Expand Down

0 comments on commit 3cb62ab

Please sign in to comment.