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

Fix task template writes to an empty tasks.json #210675

Merged
merged 2 commits into from Apr 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts
Expand Up @@ -3268,10 +3268,11 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
return result[0].resource;
});
} else if (fileExists && (tasksExistInFile || content)) {
if (content) {
this._configurationService.updateValue('tasks', json.parse(content), target);
const statResource = stat?.resource;
if (content && statResource) {
this._configurationService.updateValue('tasks', json.parse(content), { resource: statResource }, target);
}
return stat?.resource;
return statResource;
}
return undefined;
}).then((resource) => {
Expand Down