aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src
diff options
context:
space:
mode:
authorEmil Lauridsen <[email protected]>2019-04-03 08:50:38 +0100
committerEmil Lauridsen <[email protected]>2019-04-03 08:50:38 +0100
commit4d78c85de2429d89a3cb1fd688ae5a3d7596310f (patch)
treeed26c01f2cd6bedc1344ad1a1fb99ddddabe3d20 /editors/code/src
parentfdbebccd71d38c4dffffe918b036bbfa39355c5f (diff)
Fix VSCode cargo-watch functionality on Linux.
As of #1079 the VSCode cargo-watch functionality has been broken on Linux systems. The cause seems to be that linux takes the added quotes inside process arguments literally, so it attempts to make cargo-watch run the command `cargo "check --message-format json"` with the entire quoted part being treated as a single long subcommand, which cargo doesn't know how to handle. Removing the extra quotes solves the issue.
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/commands/cargo_watch.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/editors/code/src/commands/cargo_watch.ts b/editors/code/src/commands/cargo_watch.ts
index d45d0e7d1..5534084bb 100644
--- a/editors/code/src/commands/cargo_watch.ts
+++ b/editors/code/src/commands/cargo_watch.ts
@@ -46,12 +46,11 @@ 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 += '"';
55 54
56 // Start the cargo watch with json message 55 // Start the cargo watch with json message
57 this.cargoProcess = child_process.spawn( 56 this.cargoProcess = child_process.spawn(