mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
Add limited support for variables that resolve to other variables
Fixes microsoft/vscode-remote-release#5007
This commit is contained in:
parent
594fc814bc
commit
0fde806bf8
|
@ -141,7 +141,7 @@ export class AbstractVariableResolverService implements IConfigurationResolverSe
|
|||
|
||||
// loop through all variables occurrences in 'value'
|
||||
const replaced = value.replace(AbstractVariableResolverService.VARIABLE_REGEXP, (match: string, variable: string) => {
|
||||
// disallow attempted nesting, see #77289
|
||||
// disallow attempted nesting, see #77289. This doesn't exclude variables that resolve to other variables.
|
||||
if (variable.includes(AbstractVariableResolverService.VARIABLE_LHS)) {
|
||||
return match;
|
||||
}
|
||||
|
@ -152,6 +152,10 @@ export class AbstractVariableResolverService implements IConfigurationResolverSe
|
|||
resolvedVariables.set(variable, resolvedValue);
|
||||
}
|
||||
|
||||
if (resolvedValue.match(AbstractVariableResolverService.VARIABLE_REGEXP)) {
|
||||
resolvedValue = this.resolveString(environment, folderUri, resolvedValue, commandValueMapping, resolvedVariables);
|
||||
}
|
||||
|
||||
return resolvedValue;
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue