Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[task]: Update TaskConfigurationManager on Workspace Location Change #9331

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/task/src/browser/task-configuration-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ export class TaskConfigurationManager {
this.workspaceService.onWorkspaceChanged(() => {
this.updateModels();
});
this.workspaceService.onWorkspaceLocationChanged(() => {
this.updateModels();
});
}

protected createModels(): void {
Expand Down Expand Up @@ -237,6 +240,7 @@ export class TaskConfigurationManager {
}));
}
this.models.set(TaskScope.Workspace, workspaceModel);
this.onDidChangeTaskConfigEmitter.fire({ scope: TaskScope.Workspace, type: FileChangeType.UPDATED });
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/task/src/browser/task-configurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class TaskConfigurations implements Disposable {
}

getRawTaskConfigurations(scope?: TaskConfigurationScope): (TaskCustomization | TaskConfiguration)[] {
if (!scope) {
if (scope === undefined) {
kenneth-marut-work marked this conversation as resolved.
Show resolved Hide resolved
const tasks: (TaskCustomization | TaskConfiguration)[] = [];
for (const configs of this.rawTaskConfigurations.values()) {
tasks.push(...configs);
Expand Down
2 changes: 1 addition & 1 deletion packages/task/src/browser/task-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ export class TaskService implements TaskConfigurationClient {
}

/**
* Runs a task identified by the given identifier, but only if found in the give workspace folder
* Runs a task identified by the given identifier, but only if found in the given workspace folder
*
* @param token The cache token for the user interaction in progress
* @param workspaceFolderUri The folder to restrict the search to
Expand Down