Skip to content

Commit 36d972e

Browse files
committed
Fix python selection
Signed-off-by: paulober <[email protected]>
1 parent 9fd8600 commit 36d972e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/webview/newMicroPythonProjectPanel.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,9 @@ export class NewMicroPythonProjectPanel {
276276
let python3Path: string | undefined;
277277
if (process.platform === "darwin" || process.platform === "win32") {
278278
switch (data.pythonMode) {
279-
// TODO: add a simpler option, maybe to select via python extension api
279+
case 0:
280+
python3Path = data.pythonPath;
281+
break;
280282
case 1:
281283
python3Path = process.platform === "win32" ? "python" : "python3";
282284
break;

web/mpy/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ var submitted = false;
8181
let pythonPath = null;
8282
for (let i = 0; i < pythonVersionRadio.length; i++) {
8383
if (pythonVersionRadio[i].checked) {
84-
pythonMode = pythonVersionRadio[i].value;
84+
pythonMode = Number(pythonVersionRadio[i].value);
8585
break;
8686
}
8787
}

0 commit comments

Comments
 (0)