File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/client/common/variables Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -127,12 +127,14 @@ export class SystemVariables extends AbstractSystemVariables {
127
127
> ) [ `env.${ key } ` ] = process . env [ key ] ;
128
128
} ) ;
129
129
workspace = workspace ?? new WorkspaceService ( ) ;
130
- if ( workspace . workspaceFolders && 'forEach' in workspace . workspaceFolders ) {
131
- workspace . workspaceFolders . forEach ( async ( folder ) => {
130
+ try {
131
+ workspace . workspaceFolders ? .forEach ( ( folder ) => {
132
132
const basename = Path . basename ( folder . uri . fsPath ) ;
133
133
( ( this as any ) as Record < string , string | undefined > ) [ `workspaceFolder:${ basename } ` ] =
134
134
folder . uri . fsPath ;
135
135
} ) ;
136
+ } catch {
137
+ // This try...catch block is here to support pre-existing tests, ignore error.
136
138
}
137
139
}
138
140
You can’t perform that action at this time.
0 commit comments