aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands/cargo_watch.ts
diff options
context:
space:
mode:
authorAleksei Sidorov <[email protected]>2019-06-24 11:50:34 +0100
committerAleksei Sidorov <[email protected]>2019-06-24 11:50:34 +0100
commit28e9e8d4cfdf2a334cde6db7d10e7acb8f5fe8b1 (patch)
treefc7f452477d1483969ea45966d43e4545184a888 /editors/code/src/commands/cargo_watch.ts
parentc40ee089f221aa1be74614d7ad875488030e55ff (diff)
Fix code after "apply suggestions"
Diffstat (limited to 'editors/code/src/commands/cargo_watch.ts')
-rw-r--r--editors/code/src/commands/cargo_watch.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/editors/code/src/commands/cargo_watch.ts b/editors/code/src/commands/cargo_watch.ts
index 16aac3758..13adf4c10 100644
--- a/editors/code/src/commands/cargo_watch.ts
+++ b/editors/code/src/commands/cargo_watch.ts
@@ -43,7 +43,9 @@ export class CargoWatchProvider implements vscode.Disposable {
43 this.diagnosticCollection = vscode.languages.createDiagnosticCollection( 43 this.diagnosticCollection = vscode.languages.createDiagnosticCollection(
44 'rustc' 44 'rustc'
45 ); 45 );
46 this.statusDisplay = new StatusDisplay(Server.config.cargoWatchOptions.checkCommand); 46 this.statusDisplay = new StatusDisplay(
47 Server.config.cargoWatchOptions.command
48 );
47 this.outputChannel = vscode.window.createOutputChannel( 49 this.outputChannel = vscode.window.createOutputChannel(
48 'Cargo Watch Trace' 50 'Cargo Watch Trace'
49 ); 51 );
@@ -57,10 +59,12 @@ export class CargoWatchProvider implements vscode.Disposable {
57 return; 59 return;
58 } 60 }
59 61
60 let args = Server.config.cargoWatchOptions.checkCommand + ' --all-targets --message-format json'; 62 let args =
61 if (Server.config.cargoWatchOptions.checkArguments.length > 0) { 63 Server.config.cargoWatchOptions.command +
64 ' --all-targets --message-format json';
65 if (Server.config.cargoWatchOptions.command.length > 0) {
62 // Excape the double quote string: 66 // Excape the double quote string:
63 args += ' ' + Server.config.cargoWatchOptions.checkArguments; 67 args += ' ' + Server.config.cargoWatchOptions.arguments;
64 } 68 }
65 // Windows handles arguments differently than the unix-likes, so we need to wrap the args in double quotes 69 // Windows handles arguments differently than the unix-likes, so we need to wrap the args in double quotes
66 if (process.platform === 'win32') { 70 if (process.platform === 'win32') {