Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Commit 800a04a

Browse files
committed
Fix a bug where rustup didn't install all of the required components
1 parent 3676797 commit 800a04a

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
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

src/tasks.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)