diff --git a/src/webview/newMicroPythonProjectPanel.mts b/src/webview/newMicroPythonProjectPanel.mts index 3e13f77..1c296b5 100644 --- a/src/webview/newMicroPythonProjectPanel.mts +++ b/src/webview/newMicroPythonProjectPanel.mts @@ -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; diff --git a/web/mpy/main.js b/web/mpy/main.js index 2acf3f0..5633131 100644 --- a/web/mpy/main.js +++ b/web/mpy/main.js @@ -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; } }