mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51: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 = '@@';
|
const macroIndicator = '@@';
|
||||||
let output = template;
|
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
|
// check if value contains the macroIndicator, which could break expansion for successive macros
|
||||||
if (macroDict.get(macro)!.includes(macroIndicator)) {
|
if (macroDict.get(macro)!.includes(macroIndicator)) {
|
||||||
throw new Error(`Macro value ${macroDict.get(macro)} is invalid because it contains ${macroIndicator}`);
|
throw new Error(`Macro value ${macroDict.get(macro)} is invalid because it contains ${macroIndicator}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user