aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands
diff options
context:
space:
mode:
authorRoberto Vidal <[email protected]>2019-10-17 14:22:39 +0100
committerRoberto Vidal <[email protected]>2019-10-17 19:21:07 +0100
commitf4d50de2758b38208745d9594ccbcf0227d49d5b (patch)
treeb55fba950d29f6bd041f26e78e3e56cefb649c31 /editors/code/src/commands
parente8a7a7b19aab195d2b37a0b13abca4e006e9bbd5 (diff)
Adds config option for cargo-watch `--ignore` flag
Diffstat (limited to 'editors/code/src/commands')
-rw-r--r--editors/code/src/commands/cargo_watch.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/editors/code/src/commands/cargo_watch.ts b/editors/code/src/commands/cargo_watch.ts
index 00b24dbce..59d4ba97a 100644
--- a/editors/code/src/commands/cargo_watch.ts
+++ b/editors/code/src/commands/cargo_watch.ts
@@ -93,10 +93,15 @@ export class CargoWatchProvider implements vscode.Disposable {
93 args = '"' + args + '"'; 93 args = '"' + args + '"';
94 } 94 }
95 95
96 const ignoreFlags = Server.config.cargoWatchOptions.ignore.reduce(
97 (flags, pattern) => [...flags, '--ignore', pattern],
98 [] as string[]
99 );
100
96 // Start the cargo watch with json message 101 // Start the cargo watch with json message
97 this.cargoProcess = child_process.spawn( 102 this.cargoProcess = child_process.spawn(
98 'cargo', 103 'cargo',
99 ['watch', '-x', args], 104 ['watch', '-x', args, ...ignoreFlags],
100 { 105 {
101 stdio: ['ignore', 'pipe', 'pipe'], 106 stdio: ['ignore', 'pipe', 'pipe'],
102 cwd: vscode.workspace.rootPath, 107 cwd: vscode.workspace.rootPath,