mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-24 09:35:37 -05:00
Fix can't find SQLCMD variable error (#12672)
* remove sqlcmd variable deletion verification * check if sqlcmd variable exists first
This commit is contained in:
@@ -679,7 +679,9 @@ export class Project {
|
||||
|
||||
public addSqlCmdVariableToProjFile(entry: SqlCmdVariableProjectEntry): void {
|
||||
// Remove any entries with the same variable name. It'll be replaced with a new one
|
||||
this.removeFromProjFile(entry);
|
||||
if (Object.keys(this.sqlCmdVariables).includes(entry.variableName)) {
|
||||
this.removeFromProjFile(entry);
|
||||
}
|
||||
|
||||
const sqlCmdVariableNode = this.projFileXmlDoc.createElement(constants.SqlCmdVariable);
|
||||
sqlCmdVariableNode.setAttribute(constants.Include, entry.variableName);
|
||||
|
||||
Reference in New Issue
Block a user