diff options
Diffstat (limited to 'editors/code/src/commands')
-rw-r--r-- | editors/code/src/commands/cargo_watch.ts | 12 | ||||
-rw-r--r-- | editors/code/src/commands/watch_status.ts | 4 |
2 files changed, 11 insertions, 5 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') { |
diff --git a/editors/code/src/commands/watch_status.ts b/editors/code/src/commands/watch_status.ts index 91bc7195b..6c1f9041b 100644 --- a/editors/code/src/commands/watch_status.ts +++ b/editors/code/src/commands/watch_status.ts | |||
@@ -30,7 +30,9 @@ export class StatusDisplay implements vscode.Disposable { | |||
30 | this.packageName | 30 | this.packageName |
31 | }] ${this.frame()}`; | 31 | }] ${this.frame()}`; |
32 | } else { | 32 | } else { |
33 | this.statusBarItem!.text = `cargo ${this.command} ${this.frame()}`; | 33 | this.statusBarItem!.text = `cargo ${ |
34 | this.command | ||
35 | } ${this.frame()}`; | ||
34 | } | 36 | } |
35 | }, 300); | 37 | }, 300); |
36 | 38 | ||