Skip to content

Commit 3595758

Browse files
Fix task template writes to an empty tasks.json (microsoft#210675)
1 parent a9d5a65 commit 3595758

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3268,10 +3268,11 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
32683268
return result[0].resource;
32693269
});
32703270
} else if (fileExists && (tasksExistInFile || content)) {
3271-
if (content) {
3272-
this._configurationService.updateValue('tasks', json.parse(content), target);
3271+
const statResource = stat?.resource;
3272+
if (content && statResource) {
3273+
this._configurationService.updateValue('tasks', json.parse(content), { resource: statResource }, target);
32733274
}
3274-
return stat?.resource;
3275+
return statResource;
32753276
}
32763277
return undefined;
32773278
}).then((resource) => {

0 commit comments

Comments
 (0)