MCPcopy Index your code
hub / github.com/LeetCode-OpenSource/vscode-leetcode / executeCommandWithProgress

Function executeCommandWithProgress

src/utils/cpUtils.ts:42–56  ·  view source on GitHub ↗
(message: string, command: string, args: string[], options: cp.SpawnOptions = { shell: true })

Source from the content-addressed store, hash-verified

40}
41
42export 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
59export function createEnvOption(): {} {

Callers 1

Calls 1

executeCommandFunction · 0.85

Tested by

no test coverage detected