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

Commit

Permalink
spawn: Use explicit chcp.com (#910)
Browse files Browse the repository at this point in the history
Using only `chcp` relies on the setting of environment variable
PATHEXT.

Related to #869
  • Loading branch information
jayvdb authored and dooriya committed Nov 7, 2019
1 parent 4ca0246 commit 9ffd4d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@ export function spawn(command: string, outputChannel: vscode.OutputChannel, args
let codepage = "65001";
if (os.platform() === "win32") {
try {
const chcp = childProcess.execSync("chcp");
const chcp = childProcess.execSync("chcp.com");
codepage = chcp.toString().split(":").pop().trim();
} catch (error) {
arduinoChannel.warning(`Defaulting to code page 850 because chcp failed.\
arduinoChannel.warning(`Defaulting to code page 850 because chcp.com failed.\
\rEnsure your path includes %SystemRoot%\\system32\r${error.message}`);
codepage = "850";
}
Expand Down

0 comments on commit 9ffd4d8

Please sign in to comment.