Skip to content

Commit d246a5f

Browse files
authored
Undefined scope comment
1 parent 0016089 commit d246a5f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

editors/code/src/tasks.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ export async function buildCargoTask(
111111

112112
return new vscode.Task(
113113
definition,
114+
// scope can sometimes be undefined. in these situations we default to the workspace taskscope as
115+
// recommended by the official docs: https://code.visualstudio.com/api/extension-guides/task-provider#task-provider)
114116
scope ?? vscode.TaskScope.Workspace,
115117
name,
116118
TASK_SOURCE,

0 commit comments

Comments
 (0)