Skip to content

Commit

Permalink
Fix for dacfx wizard if user doesn't have access to master db (micros…
Browse files Browse the repository at this point in the history
…oft#9362)

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

* add console.warn with error
  • Loading branch information
kisantia authored Feb 27, 2020
1 parent 2de3bd3 commit c8bcd25
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion extensions/dacpac/src/wizard/api/dacFxConfigPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down

0 comments on commit c8bcd25

Please sign in to comment.