(message: string, command: string, args: string[], options: cp.SpawnOptions = { shell: true })
| 40 | } |
| 41 | |
| 42 | export async function executeCommandWithProgress(message: string, command: string, args: string[], options: cp.SpawnOptions = { shell: true }): Promise<string> { |
| 43 | let result: string = ""; |
| 44 | await vscode.window.withProgress({ location: vscode.ProgressLocation.Notification }, async (p: vscode.Progress<{}>) => { |
| 45 | return new Promise<void>(async (resolve: () => void, reject: (e: Error) => void): Promise<void> => { |
| 46 | p.report({ message }); |
| 47 | try { |
| 48 | result = await executeCommand(command, args, options); |
| 49 | resolve(); |
| 50 | } catch (e) { |
| 51 | reject(e); |
| 52 | } |
| 53 | }); |
| 54 | }); |
| 55 | return result; |
| 56 | } |
| 57 | |
| 58 | // clone process.env and add http proxy |
| 59 | export function createEnvOption(): {} { |
no test coverage detected