aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands/runnables.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/commands/runnables.ts')
-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);