mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 09:35:36 -05:00
fix macros not getting replaced in sql project item scripts (#22945)
This commit is contained in:
@@ -65,7 +65,7 @@ export function macroExpansion(template: string, macroDict: Map<string, string>)
|
||||
const macroIndicator = '@@';
|
||||
let output = template;
|
||||
|
||||
for (const macro in macroDict) {
|
||||
for (const macro of macroDict.keys()) {
|
||||
// check if value contains the macroIndicator, which could break expansion for successive macros
|
||||
if (macroDict.get(macro)!.includes(macroIndicator)) {
|
||||
throw new Error(`Macro value ${macroDict.get(macro)} is invalid because it contains ${macroIndicator}`);
|
||||
|
||||
Reference in New Issue
Block a user