From 3a79490187264c5cf11a59d8fd1738f876829f6a Mon Sep 17 00:00:00 2001 From: Emil Lauridsen Date: Wed, 3 Apr 2019 10:38:18 +0200 Subject: 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. --- editors/code/src/commands/cargo_watch.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'editors') diff --git a/editors/code/src/commands/cargo_watch.ts b/editors/code/src/commands/cargo_watch.ts index 5534084bb..6b6113017 100644 --- a/editors/code/src/commands/cargo_watch.ts +++ b/editors/code/src/commands/cargo_watch.ts @@ -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( -- cgit v1.2.3