Skip to content

Commit c2cc7a6

Browse files
authored
Merge pull request #716 from isc-bsaviano/fix-677
Require confirmation for namespace compile command
2 parents 288444f + 82ead6f commit c2cc7a6

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)