Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'editors/code/tests/unit/tasks.test.ts')
| -rw-r--r-- | editors/code/tests/unit/tasks.test.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editors/code/tests/unit/tasks.test.ts b/editors/code/tests/unit/tasks.test.ts index 9bccaaf3d4..9b5d98ee7e 100644 --- a/editors/code/tests/unit/tasks.test.ts +++ b/editors/code/tests/unit/tasks.test.ts @@ -114,6 +114,7 @@ function f(task: vscode.Task): { execution, }; } + function executionToSimple( taskExecution: vscode.ProcessExecution | vscode.ShellExecution | vscode.CustomExecution, ): { @@ -122,8 +123,8 @@ function executionToSimple( const exec = taskExecution as vscode.ProcessExecution | vscode.ShellExecution; if (exec instanceof vscode.ShellExecution) { return { - command: typeof exec.command === "string" ? exec.command : exec.command.value, - args: exec.args.map((arg) => { + command: typeof exec.command === "string" ? exec.command : (exec.command?.value ?? ""), + args: (exec.args ?? []).map((arg) => { if (typeof arg === "string") { return arg; } |