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 16, 2024
1 parent 9fd8600 commit 36d972e
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 36d972e

Please sign in to comment.