Don't fail when resolving config variables without a folderUri.

Config variables cannot define a workspace folder, but resolution was using `getFolderUri` and failing when undefined, even though `getConfigurationValue` implementations have logic to handle it. This PR changes the logic to simply forward folderUri to `getConfigurationValue`, which can be undefined.
This commit is contained in:
Borja Zarco
2020-05-07 22:29:20 -04:00
parent fbb367917c
commit bed300cd4f
4 changed files with 17 additions and 6 deletions

View File

@@ -985,7 +985,7 @@ export class ExtHostVariableResolverService extends AbstractVariableResolverServ
getWorkspaceFolderCount: (): number => {
return folders.length;
},
getConfigurationValue: (folderUri: URI, section: string): string | undefined => {
getConfigurationValue: (folderUri: URI | undefined, section: string): string | undefined => {
return configurationService.getConfiguration(undefined, folderUri).get<string>(section);
},
getExecPath: (): string | undefined => {