Add extra double quotes only on Windows.

As tested by @edwin0cheng, Windows requires the quotes removed in the
previous commit. This commit re-adds the quotes gated by an if statement
on the node environment, so that quotes are only added on Windows.
This commit is contained in:
Emil Lauridsen 2019-04-03 10:38:18 +02:00
parent 4d78c85de2
commit 3a79490187

View file

@ -51,6 +51,10 @@ export class CargoWatchProvider {
// Excape the double quote string:
args += ' ' + Server.config.cargoWatchOptions.checkArguments;
}
// Windows handles arguments differently than the unix-likes, so we need to wrap the args in double quotes
if (process.platform == "win32") {
args = '"' + args + '"';
}
// Start the cargo watch with json message
this.cargoProcess = child_process.spawn(