Skip to content

Commit

Permalink
Full cmd support for pre-/post-build commands on Windows
Browse files Browse the repository at this point in the history
Addresses microsoft#786
  • Loading branch information
elektronikworkshop committed Feb 28, 2020
1 parent d576ee6 commit 86ca967
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/arduino/arduino.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,10 @@ Please make sure the folder is not occupied by other procedures .`);
let cmd: string;
let args: string[];
// pre-/post-build commands feature full bash support on UNIX systems.
// Windows users must live with their poor system unless someone is
// willing to fight with the annoying Windows cmd escaping -- good luck!
// On Windows you have full cmd support.
if (os.platform() === "win32") {
args = cmdline.split(/\s+/);
cmd = args.shift();
args = [];
cmd = cmdline;
} else {
args = ["-c", cmdline];
cmd = "bash";
Expand Down

0 comments on commit 86ca967

Please sign in to comment.