This commit is contained in:
alexet 2020-12-16 16:45:05 +00:00 коммит произвёл Andrew Eisenberg
Родитель 676546d32b
Коммит a399041cba
1 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -99,6 +99,7 @@ async function compileDatabaseUpgrade(
async function checkAndConfirmDatabaseUpgrade(
compiled: messages.CompiledUpgrades,
db: DatabaseItem,
quiet: boolean
): Promise<void> {
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:');