Skip to content

Commit

Permalink
Fix task template writes to an empty tasks.json (#210675)
Browse files Browse the repository at this point in the history
  • Loading branch information
CareyJWilliams committed Apr 18, 2024
1 parent a9d5a65 commit 3595758
Showing 1 changed file with 4 additions and 3 deletions.
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

0 comments on commit 3595758

Please sign in to comment.