MCPcopy Create free account
hub / github.com/facebook/pyrefly / executeProcessTask

Function executeProcessTask

lsp/src/codeLens.ts:189–216  ·  view source on GitHub ↗
(
  uri: vscode.Uri,
  cwd: string | undefined,
  definition: vscode.TaskDefinition,
  label: string,
  command: string,
  args: string[],
)

Source from the content-addressed store, hash-verified

187}
188
189async function executeProcessTask(
190 uri: vscode.Uri,
191 cwd: string | undefined,
192 definition: vscode.TaskDefinition,
193 label: string,
194 command: string,
195 args: string[],
196): Promise<void> {
197 // Use ProcessExecution so VS Code passes argv directly instead of relying on
198 // shell-specific quoting rules.
199 const task = new vscode.Task(
200 definition,
201 scopeForUri(uri),
202 label,
203 TASK_SOURCE,
204 new vscode.ProcessExecution(command, args, {
205 cwd,
206 }),
207 );
208 task.presentationOptions = {
209 reveal: vscode.TaskRevealKind.Always,
210 panel: vscode.TaskPanelKind.Dedicated,
211 focus: true,
212 clear: false,
213 showReuseMessage: false,
214 };
215 await vscode.tasks.executeTask(task);
216}
217
218async function runMainFile(
219 args: RunMainArgs,

Callers 2

runMainFileFunction · 0.85
runTestAtLocationFunction · 0.85

Calls 1

scopeForUriFunction · 0.85

Tested by

no test coverage detected