File tree Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Original file line number Diff line number Diff line change @@ -109,26 +109,14 @@ export async function buildCargoTask(
109109 exec = new vscode . ProcessExecution ( fullCommand [ 0 ] , fullCommand . slice ( 1 ) , definition ) ;
110110 }
111111
112- if ( scope ) {
113- return new vscode . Task (
114- definition ,
115- scope ,
116- name ,
117- TASK_SOURCE ,
118- exec ,
119- [ '$rustc' ]
120- ) ;
121- }
122- else {
123- // if the original task did not provide a scope retain the original lack of scope
124- return new vscode . Task (
125- definition ,
126- name ,
127- TASK_SOURCE ,
128- exec ,
129- [ '$rustc' ]
130- ) ;
131- }
112+ return new vscode . Task (
113+ definition ,
114+ scope ?? vscode . TaskScope . Workspace ,
115+ name ,
116+ TASK_SOURCE ,
117+ exec ,
118+ [ '$rustc' ]
119+ ) ;
132120}
133121
134122export function activateTaskProvider ( config : Config ) : vscode . Disposable {
You can’t perform that action at this time.
0 commit comments