Fix for dacfx wizard if user doesn't have access to master db (#9362)

* fix for if user doesn't have access to master db

* add console.warn with error
This commit is contained in:
Kim Santiago
2020-02-27 15:37:04 -08:00
committed by GitHub
parent 2de3bd3209
commit c8bcd25832

View File

@@ -132,7 +132,14 @@ export abstract class DacFxConfigPage extends BasePage {
return false;
}
let values = await this.getDatabaseValues();
let values: string[];
try {
values = await this.getDatabaseValues();
} catch (e) {
// if the user doesn't have access to master, just set the database to the one the current connection is to
values = [this.model.server.databaseName];
console.warn(e);
}
// only update values and regenerate filepath if this is the first time and database isn't set yet
if (this.model.database !== values[0]) {