Skip to content

Commit

Permalink
fix the reference error due to extra $ in default variable (#12524)
Browse files Browse the repository at this point in the history
  • Loading branch information
udeeshagautam committed Sep 21, 2020
1 parent a4ee871 commit 77b9a70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion extensions/sql-database-projects/src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const enterSystemDbName = localize('enterSystemDbName', "Enter a database
export const databaseNameRequiredVariableOptional = localize('databaseNameRequiredVariableOptional', "A database name is required. The database variable is optional.");
export const databaseNameServerNameVariableRequired = localize('databaseNameServerNameVariableRequired', "A database name, server name, and server variable are required. The database variable is optional");
export const otherServer = 'OtherServer';
export const otherSeverVariable = '$(OtherServer)';
export const otherSeverVariable = 'OtherServer';
export const databaseProject = localize('databaseProject', "Database project");

// Error messages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ export class AddDatabaseReferenceDialog {
switch (this.currentReferenceType) {
case ReferenceType.project: {
this.databaseNameTextbox!.value = <string>this.projectDropdown?.value;
this.databaseVariableTextbox!.value = `$(${this.projectDropdown?.value})`;
this.databaseVariableTextbox!.value = `${this.projectDropdown?.value}`;
break;
}
case ReferenceType.systemDb: {
Expand All @@ -443,7 +443,7 @@ export class AddDatabaseReferenceDialog {
case ReferenceType.dacpac: {
const dacpacName = this.dacpacTextbox!.value ? path.parse(this.dacpacTextbox!.value!).name : '';
this.databaseNameTextbox!.value = dacpacName;
this.databaseVariableTextbox!.value = dacpacName ? `$(${dacpacName})` : '';
this.databaseVariableTextbox!.value = dacpacName ? `${dacpacName}` : '';
break;
}
}
Expand Down

0 comments on commit 77b9a70

Please sign in to comment.