diff options
-rw-r--r-- | editors/code/src/commands/cargo_watch.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/editors/code/src/commands/cargo_watch.ts b/editors/code/src/commands/cargo_watch.ts index d45d0e7d1..32bd38a1c 100644 --- a/editors/code/src/commands/cargo_watch.ts +++ b/editors/code/src/commands/cargo_watch.ts | |||
@@ -46,12 +46,15 @@ export class CargoWatchProvider { | |||
46 | 'Cargo Watch Trace' | 46 | 'Cargo Watch Trace' |
47 | ); | 47 | ); |
48 | 48 | ||
49 | let args = '"check --message-format json'; | 49 | let args = 'check --message-format json'; |
50 | if (Server.config.cargoWatchOptions.checkArguments.length > 0) { | 50 | if (Server.config.cargoWatchOptions.checkArguments.length > 0) { |
51 | // Excape the double quote string: | 51 | // Excape the double quote string: |
52 | args += ' ' + Server.config.cargoWatchOptions.checkArguments; | 52 | args += ' ' + Server.config.cargoWatchOptions.checkArguments; |
53 | } | 53 | } |
54 | args += '"'; | 54 | // Windows handles arguments differently than the unix-likes, so we need to wrap the args in double quotes |
55 | if (process.platform === 'win32') { | ||
56 | args = '"' + args + '"'; | ||
57 | } | ||
55 | 58 | ||
56 | // Start the cargo watch with json message | 59 | // Start the cargo watch with json message |
57 | this.cargoProcess = child_process.spawn( | 60 | this.cargoProcess = child_process.spawn( |