diff options
author | Igor Matuszewski <[email protected]> | 2019-03-18 21:51:01 +0000 |
---|---|---|
committer | Igor Matuszewski <[email protected]> | 2019-03-18 21:51:01 +0000 |
commit | 34b428cc5e4b37ecd44063547f73fd1b05bf2b9e (patch) | |
tree | a6fd5669791ec2c1ed9c23bd3dcf60818630fac6 /editors | |
parent | 7c2595c26820917fa9ad1b1c36f01fc6ac979287 (diff) |
Appease CI
Diffstat (limited to 'editors')
-rw-r--r-- | editors/code/src/commands/runnables.ts | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts index 74407dc3e..ea2883ad4 100644 --- a/editors/code/src/commands/runnables.ts +++ b/editors/code/src/commands/runnables.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { exec } from 'child_process'; | 1 | import * as child_process from 'child_process'; |
2 | import * as util from 'util'; | 2 | import * as util from 'util'; |
3 | import * as vscode from 'vscode'; | 3 | import * as vscode from 'vscode'; |
4 | import * as lc from 'vscode-languageclient'; | 4 | import * as lc from 'vscode-languageclient'; |
@@ -157,7 +157,7 @@ export async function interactivelyStartCargoWatch() { | |||
157 | return; | 157 | return; |
158 | } | 158 | } |
159 | 159 | ||
160 | const execAsync = util.promisify(exec); | 160 | const execPromise = util.promisify(child_process.exec); |
161 | 161 | ||
162 | const watch = await vscode.window.showInformationMessage( | 162 | const watch = await vscode.window.showInformationMessage( |
163 | 'Start watching changes with cargo? (Executes `cargo watch`, provides inline diagnostics)', | 163 | 'Start watching changes with cargo? (Executes `cargo watch`, provides inline diagnostics)', |
@@ -168,7 +168,7 @@ export async function interactivelyStartCargoWatch() { | |||
168 | return; | 168 | return; |
169 | } | 169 | } |
170 | 170 | ||
171 | const { stderr } = await execAsync('cargo watch --version').catch(e => e); | 171 | const { stderr } = await execPromise('cargo watch --version').catch(e => e); |
172 | if (stderr.includes('no such subcommand: `watch`')) { | 172 | if (stderr.includes('no such subcommand: `watch`')) { |
173 | const msg = | 173 | const msg = |
174 | 'The `cargo-watch` subcommand is not installed. Install? (takes ~1-2 minutes)'; | 174 | 'The `cargo-watch` subcommand is not installed. Install? (takes ~1-2 minutes)'; |
@@ -183,7 +183,7 @@ export async function interactivelyStartCargoWatch() { | |||
183 | 183 | ||
184 | const label = 'install-cargo-watch'; | 184 | const label = 'install-cargo-watch'; |
185 | const taskFinished = new Promise((resolve, reject) => { | 185 | const taskFinished = new Promise((resolve, reject) => { |
186 | let disposable = vscode.tasks.onDidEndTask(({ execution }) => { | 186 | const disposable = vscode.tasks.onDidEndTask(({ execution }) => { |
187 | if (execution.task.name === label) { | 187 | if (execution.task.name === label) { |
188 | disposable.dispose(); | 188 | disposable.dispose(); |
189 | resolve(); | 189 | resolve(); |
@@ -200,12 +200,10 @@ export async function interactivelyStartCargoWatch() { | |||
200 | }) | 200 | }) |
201 | ); | 201 | ); |
202 | await taskFinished; | 202 | await taskFinished; |
203 | const { stderr } = await execAsync('cargo watch --version').catch( | 203 | const output = await execPromise('cargo watch --version').catch(e => e); |
204 | e => e | 204 | if (output.stderr !== '') { |
205 | ); | ||
206 | if (stderr !== '') { | ||
207 | vscode.window.showErrorMessage( | 205 | vscode.window.showErrorMessage( |
208 | `Couldn't install \`cargo-\`watch: ${stderr}` | 206 | `Couldn't install \`cargo-\`watch: ${output.stderr}` |
209 | ); | 207 | ); |
210 | return; | 208 | return; |
211 | } | 209 | } |