Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 9ffd4d8

Browse files
jayvdbdooriya
authored andcommitted
spawn: Use explicit chcp.com (#910)
Using only `chcp` relies on the setting of environment variable PATHEXT. Related to #869
1 parent 4ca0246 commit 9ffd4d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common/util.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,10 @@ export function spawn(command: string, outputChannel: vscode.OutputChannel, args
210210
let codepage = "65001";
211211
if (os.platform() === "win32") {
212212
try {
213-
const chcp = childProcess.execSync("chcp");
213+
const chcp = childProcess.execSync("chcp.com");
214214
codepage = chcp.toString().split(":").pop().trim();
215215
} catch (error) {
216-
arduinoChannel.warning(`Defaulting to code page 850 because chcp failed.\
216+
arduinoChannel.warning(`Defaulting to code page 850 because chcp.com failed.\
217217
\rEnsure your path includes %SystemRoot%\\system32\r${error.message}`);
218218
codepage = "850";
219219
}

0 commit comments

Comments
 (0)