Skip to content

Commit b477fbc

Browse files
committed
refactor: add overwrite option
1 parent d284b18 commit b477fbc

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/task.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,12 @@ async function createBuildTask(isJXA = false): Promise<void> {
9595
}
9696

9797
if (await fileExists(buildFile)) {
98-
window.showErrorMessage(
99-
'This workspace already has a task file. If you want to overwrite it, delete it manually and try again.',
100-
);
101-
return;
98+
const overwrite = 'Overwrite';
99+
const result = await window.showWarningMessage('This workspace already has a task file.', overwrite, 'Cancel');
100+
101+
if (result !== overwrite) {
102+
return;
103+
}
102104
}
103105

104106
try {

0 commit comments

Comments
 (0)