Skip to content

Commit f3032e4

Browse files
committed
Fix #252, py-launcher compatibility
Signed-off-by: paulober <[email protected]>
1 parent 3811c02 commit f3032e4

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ All notable changes to the "MicroPico" extension will be documented in this file
1010

1111
---
1212

13+
## [4.0.5] - 2024-09-16
14+
15+
### Changed
16+
17+
- Fix #252, py-launcher compatibility
18+
1319
## [4.0.4] - 2024-09-13
1420

1521
### Added

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "pico-w-go",
33
"displayName": "MicroPico",
44
"description": "Auto-completion, remote workspace and a REPL console integration for the Raspberry Pi Pico boards running MicroPython firmware.",
5-
"version": "4.0.4",
5+
"version": "4.0.5",
66
"publisher": "paulober",
77
"license": "MPL-2.0",
88
"homepage": "https://github.com/paulober/MicroPico/blob/main/README.md",

src/stubs.mts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ export async function installStubsByVersion(
303303

304304
const pyCmd = python3 ?? py;
305305
if (pyCmd !== null) {
306-
// TODO: check windows pylauncher compatibility
307306
const result = execSync(pyCmd + " -m pip");
308307
if (result.toString("utf-8").toLowerCase().includes("no module named")) {
309308
void window.showErrorMessage(
@@ -313,7 +312,7 @@ export async function installStubsByVersion(
313312

314313
return false;
315314
}
316-
command = `${pyCmd} -m pip`;
315+
command = `"${pyCmd}" -m pip`;
317316
} else {
318317
void window.showErrorMessage(
319318
"python3 or py is required (in PATH) to install" +
@@ -324,7 +323,7 @@ export async function installStubsByVersion(
324323
}
325324
} else {
326325
assert(pip3 !== null || pip !== null);
327-
command = (pip3 ?? pip)!;
326+
command = `"${(pip3 ?? pip)!}"`;
328327
}
329328

330329
const folderName = `${port}==${version}`;
@@ -334,7 +333,7 @@ export async function installStubsByVersion(
334333
const isWin = process.platform === "win32";
335334
// install stubs with pip vscode user directory
336335
const result = execSync(
337-
`${isWin ? "&" : ""}"${command}" install ${port}==${version} ` +
336+
`${isWin ? "&" : ""}${command} install ${port}==${version} ` +
338337
`--target "${target}" --no-user`,
339338
isWin ? { shell: "powershell" } : {}
340339
);

0 commit comments

Comments
 (0)