This repository was archived by the owner on Nov 18, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 11### Unreleased
22
3+ * Fix a bug where rustup didn't install all of the required components for the RLS
34* Don't warn on custom ` rust-client.channel ` value such as ` 1.39.0 ` in properties.json
45* Add a new ` default ` value for ` rust-client.channel ` (same as setting it explicitly to ` null ` )
56* Add a self-closing angular (` > ` ) bracket whenever opening one (` < ` ) has been typed
Original file line number Diff line number Diff line change @@ -131,22 +131,28 @@ export async function runTaskCommand(
131131 displayName : string ,
132132 folder ?: WorkspaceFolder ,
133133) {
134- const uniqueId = crypto . randomBytes ( 20 ) . toString ( ) ;
134+ // Task finish callback does not preserve concrete task definitions, we so
135+ // disambiguate finished tasks via executed command line.
136+ const commandLine = `${ command } ${ args . join ( ' ' ) } ` ;
135137
136138 const task = new Task (
137- { label : uniqueId , type : 'shell' } ,
138- folder ? folder : workspace . workspaceFolders ! [ 0 ] ,
139+ { type : 'shell' } ,
140+ folder || workspace . workspaceFolders ! [ 0 ] ,
139141 displayName ,
140142 TASK_SOURCE ,
141- new ShellExecution ( ` ${ command } ${ args . join ( ' ' ) } ` , {
143+ new ShellExecution ( commandLine , {
142144 cwd : cwd || ( folder && folder . uri . fsPath ) ,
143145 env,
144146 } ) ,
145147 ) ;
146148
147149 return new Promise ( resolve => {
148150 const disposable = tasks . onDidEndTask ( ( { execution } ) => {
149- if ( execution . task === task ) {
151+ const taskExecution = execution . task . execution ;
152+ if (
153+ taskExecution instanceof ShellExecution &&
154+ taskExecution . commandLine === commandLine
155+ ) {
150156 disposable . dispose ( ) ;
151157 resolve ( ) ;
152158 }
You can’t perform that action at this time.
0 commit comments