( uri: vscode.Uri, cwd: string | undefined, definition: vscode.TaskDefinition, label: string, command: string, args: string[], )
| 187 | } |
| 188 | |
| 189 | async 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 | |
| 218 | async function runMainFile( |
| 219 | args: RunMainArgs, |
no test coverage detected