File tree 6 files changed +9
-9
lines changed
6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ async function getServer(
36
36
config : Config ,
37
37
state : PersistentState
38
38
) : Promise < string | undefined > {
39
- const explicitPath = process . env . __RA_LSP_SERVER_DEBUG ?? config . serverPath ;
39
+ const explicitPath = process . env [ " __RA_LSP_SERVER_DEBUG" ] ?? config . serverPath ;
40
40
if ( explicitPath ) {
41
41
if ( explicitPath . startsWith ( "~/" ) ) {
42
42
return os . homedir ( ) + explicitPath . slice ( "~" . length ) ;
Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ export function substituteVariablesInEnv(env: Env): Env {
339
339
const depRe = new RegExp ( / \$ { (?< depName > .+ ?) } / g) ;
340
340
let match = undefined ;
341
341
while ( ( match = depRe . exec ( value ) ) ) {
342
- const depName = unwrapUndefinable ( match . groups ?. depName ) ;
342
+ const depName = unwrapUndefinable ( match . groups ?. [ " depName" ] ) ;
343
343
deps . add ( depName ) ;
344
344
// `depName` at this point can have a form of `expression` or
345
345
// `prefix:expression`
@@ -448,7 +448,7 @@ function computeVscodeVar(varName: string): string | null {
448
448
// https://github.com/microsoft/vscode/blob/08ac1bb67ca2459496b272d8f4a908757f24f56f/src/vs/workbench/api/common/extHostVariableResolverService.ts#L81
449
449
// or
450
450
// https://github.com/microsoft/vscode/blob/29eb316bb9f154b7870eb5204ec7f2e7cf649bec/src/vs/server/node/remoteTerminalChannel.ts#L56
451
- execPath : ( ) => process . env . VSCODE_EXEC_PATH ?? process . execPath ,
451
+ execPath : ( ) => process . env [ " VSCODE_EXEC_PATH" ] ?? process . execPath ,
452
452
453
453
pathSeparator : ( ) => path . sep ,
454
454
} ;
Original file line number Diff line number Diff line change @@ -147,8 +147,9 @@ async function getDebugConfiguration(
147
147
debugConfig . name = `run ${ path . basename ( executable ) } ` ;
148
148
}
149
149
150
- if ( debugConfig . cwd ) {
151
- debugConfig . cwd = simplifyPath ( debugConfig . cwd ) ;
150
+ const cwd = debugConfig [ "cwd" ] ;
151
+ if ( cwd ) {
152
+ debugConfig [ "cwd" ] = simplifyPath ( cwd ) ;
152
153
}
153
154
154
155
return debugConfig ;
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ export const getPathForExecutable = memoizeAsync(
176
176
) ;
177
177
178
178
async function lookupInPath ( exec : string ) : Promise < boolean > {
179
- const paths = process . env . PATH ?? "" ;
179
+ const paths = process . env [ " PATH" ] ?? "" ;
180
180
181
181
const candidates = paths . split ( path . delimiter ) . flatMap ( ( dirInPath ) => {
182
182
const candidate = path . join ( dirInPath , exec ) ;
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ export async function getTests(ctx: Context) {
57
57
USING_VSCODE_VAR : "${workspaceFolderBasename}" ,
58
58
} ;
59
59
const actualEnv = await substituteVariablesInEnv ( envJson ) ;
60
- assert . deepStrictEqual ( actualEnv . USING_VSCODE_VAR , "code" ) ;
60
+ assert . deepStrictEqual ( actualEnv [ " USING_VSCODE_VAR" ] , "code" ) ;
61
61
} ) ;
62
62
} ) ;
63
63
}
Original file line number Diff line number Diff line change 13
13
// These disables some enhancement type checking options
14
14
// to update typescript version without any code change.
15
15
"useUnknownInCatchVariables" : false ,
16
- "exactOptionalPropertyTypes" : false ,
17
- "noPropertyAccessFromIndexSignature" : false
16
+ "exactOptionalPropertyTypes" : false
18
17
},
19
18
"exclude" : [" node_modules" , " .vscode-test" ],
20
19
"include" : [" src" , " tests" ]
You can’t perform that action at this time.
0 commit comments