mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -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 {
|
public addSqlCmdVariableToProjFile(entry: SqlCmdVariableProjectEntry): void {
|
||||||
// Remove any entries with the same variable name. It'll be replaced with a new one
|
// Remove any entries with the same variable name. It'll be replaced with a new one
|
||||||
|
if (Object.keys(this.sqlCmdVariables).includes(entry.variableName)) {
|
||||||
this.removeFromProjFile(entry);
|
this.removeFromProjFile(entry);
|
||||||
|
}
|
||||||
|
|
||||||
const sqlCmdVariableNode = this.projFileXmlDoc.createElement(constants.SqlCmdVariable);
|
const sqlCmdVariableNode = this.projFileXmlDoc.createElement(constants.SqlCmdVariable);
|
||||||
sqlCmdVariableNode.setAttribute(constants.Include, entry.variableName);
|
sqlCmdVariableNode.setAttribute(constants.Include, entry.variableName);
|
||||||
|
|||||||
Reference in New Issue
Block a user