aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src
diff options
context:
space:
mode:
authorSeivan Heidari <[email protected]>2019-11-18 01:27:53 +0000
committerSeivan Heidari <[email protected]>2019-11-18 01:27:53 +0000
commit166636ba77adcf5bf2c4ef935e9aa75e20f25e10 (patch)
tree168be1ca55c73b016e20586c08417c608450c92c /editors/code/src
parentcb26df950699586b314731fb70786e0db8eaa049 (diff)
parent28c2d74b2150102a8756a5357a5a965d7610bd15 (diff)
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/commands/runnables.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts
index 26372c1e8..ac59bf60d 100644
--- a/editors/code/src/commands/runnables.ts
+++ b/editors/code/src/commands/runnables.ts
@@ -161,7 +161,9 @@ export async function startCargoWatch(
161): Promise<CargoWatchProvider | undefined> { 161): Promise<CargoWatchProvider | undefined> {
162 const execPromise = util.promisify(child_process.exec); 162 const execPromise = util.promisify(child_process.exec);
163 163
164 const { stderr } = await execPromise('cargo watch --version').catch(e => e); 164 const { stderr, code = 0 } = await execPromise(
165 'cargo watch --version'
166 ).catch(e => e);
165 167
166 if (stderr.includes('no such subcommand: `watch`')) { 168 if (stderr.includes('no such subcommand: `watch`')) {
167 const msg = 169 const msg =
@@ -201,6 +203,11 @@ export async function startCargoWatch(
201 ); 203 );
202 return; 204 return;
203 } 205 }
206 } else if (code !== 0) {
207 vscode.window.showErrorMessage(
208 `\`cargo watch\` failed with ${code}: ${stderr}`
209 );
210 return;
204 } 211 }
205 212
206 const provider = await registerCargoWatchProvider(context.subscriptions); 213 const provider = await registerCargoWatchProvider(context.subscriptions);