From a399041cba12c8d897ee2438783b041a8d46cbbe Mon Sep 17 00:00:00 2001 From: alexet Date: Wed, 16 Dec 2020 16:45:05 +0000 Subject: [PATCH] Fix rebase conflict --- extensions/ql-vscode/src/upgrades.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/extensions/ql-vscode/src/upgrades.ts b/extensions/ql-vscode/src/upgrades.ts index 964c0e668..113a9cfcc 100644 --- a/extensions/ql-vscode/src/upgrades.ts +++ b/extensions/ql-vscode/src/upgrades.ts @@ -99,6 +99,7 @@ async function compileDatabaseUpgrade( async function checkAndConfirmDatabaseUpgrade( compiled: messages.CompiledUpgrades, db: DatabaseItem, + quiet: boolean ): Promise { let descriptionMessage = ''; @@ -110,6 +111,11 @@ async function checkAndConfirmDatabaseUpgrade( logger.log(descriptionMessage); + // If the quiet flag is set, do the upgrade without a popup. + if (quiet) { + return; + } + // Ask the user to confirm the upgrade. const showLogItem: vscode.MessageItem = { title: 'No, Show Changes', isCloseAffordance: true }; @@ -198,11 +204,7 @@ export async function upgradeDatabaseExplicit( return; } - - // If the quiet flag is set, do the upgrade without a popup. - if (!qs.cliServer.quiet) { - await checkAndConfirmDatabaseUpgrade(compileUpgradeResult.compiledUpgrades, db); - } + await checkAndConfirmDatabaseUpgrade(compileUpgradeResult.compiledUpgrades, db, qs.cliServer.quiet); try { qs.logger.log('Running the following database upgrade:');