Skip to content

Commit 82ead6f

Browse files
committed
Add confirmation message
1 parent 6793e16 commit 82ead6f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/commands/compile.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,15 @@ export async function namespaceCompile(askFlags = false): Promise<any> {
337337
if (!config("conn").active) {
338338
throw new Error(`No Active Connection`);
339339
}
340+
const confirm = await vscode.window.showWarningMessage(
341+
`Compiling all files in namespace '${api.ns}' is expensive! Are you sure you want to proceed?`,
342+
"Cancel",
343+
"Confirm"
344+
);
345+
if (confirm !== "Confirm") {
346+
// Don't compile without confirmation
347+
return;
348+
}
340349
const defaultFlags = config().compileFlags;
341350
const flags = askFlags ? await compileFlags() : defaultFlags;
342351
if (flags === undefined) {

0 commit comments

Comments
 (0)