File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ This changelog records changes to stable releases since 1.50.2. "TBA" changes he
4
4
5
5
## Nightly (only)
6
6
7
+ - fix: envFiles variables appending rather than replacing in attach ([ vscode #1935510 ] ( https://github.com/microsoft/vscode/issues/1935510 ) )
7
8
- fix: make source map renames scope-aware
8
9
- fix: error when processing private properties with a map ([ #1824 ] ( https://github.com/microsoft/vscode-js-debug/issues/1824 ) )
9
10
Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ import { delay } from '../../common/promiseUtil';
11
11
import { AnyNodeConfiguration } from '../../configuration' ;
12
12
import { NodeLauncherBase } from './nodeLauncherBase' ;
13
13
14
+ /** Variables that should be appended rather than replaced in the environment */
15
+ const appendVars : readonly string [ ] = [ 'NODE_OPTIONS' , 'VSCODE_INSPECTOR_OPTIONS' ] ;
16
+
14
17
/**
15
18
* Base class that implements common matters for attachment.
16
19
*/
@@ -22,7 +25,9 @@ export abstract class NodeAttacherBase<T extends AnyNodeConfiguration> extends N
22
25
Object . entries ( vars . defined ( ) )
23
26
. map ( ( [ key , value ] ) => {
24
27
const k = JSON . stringify ( key ) ;
25
- return `process.env[${ k } ]=(process.env[${ k } ]||'')+${ JSON . stringify ( value ) } ` ;
28
+ return appendVars . includes ( key )
29
+ ? `process.env[${ k } ]=(process.env[${ k } ]||'')+${ JSON . stringify ( value ) } `
30
+ : `process.env[${ k } ]=${ JSON . stringify ( value ) } ` ;
26
31
} )
27
32
. join ( ';' ) +
28
33
'})()' +
You can’t perform that action at this time.
0 commit comments