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

Commit 40312f7

Browse files
committed
spawn: Use explicit chcp.com
Using only `chcp` relies on the setting of environment variable PATHEXT. Related to #869
1 parent ebd03db commit 40312f7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/common/util.ts

+3-3
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");
214-
codepage = chcp.toString().split(":").pop().trim();
213+
const chcp.com = childProcess.execSync("chcp");
214+
codepage = chcp.com.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)