File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,10 @@ export class SettingManager {
112112 this . refreshC51Status ( ) ;
113113 }
114114
115+ if ( e . affectsConfiguration ( 'EIDE.Builder.EnvironmentVariables' ) ) {
116+ this . syncGlobalEnvVariablesToNodeEnv ( ) ;
117+ }
118+
115119 } catch ( error ) {
116120 GlobalEvent . emit ( 'globalLog' , ExceptionToMessage ( error , 'Hidden' ) ) ;
117121 }
@@ -252,6 +256,13 @@ export class SettingManager {
252256
253257 //--------------------- Global Option ------------------------
254258
259+ syncGlobalEnvVariablesToNodeEnv ( ) {
260+ const envs = this . getGlobalEnvVariables ( ) ;
261+ for ( const key in envs ) {
262+ process . env [ key ] = envs [ key ] ;
263+ }
264+ }
265+
255266 getGlobalEnvVariables ( ) : { [ key : string ] : string } {
256267 const lines = this . getConfiguration ( ) . get < string [ ] > ( 'Builder.EnvironmentVariables' ) || [ ] ;
257268 const result : { [ key : string ] : string } = { } ;
Original file line number Diff line number Diff line change @@ -865,6 +865,8 @@ function exportEnvToSysPath(context?: vscode.ExtensionContext) {
865865 // 支持运行时回滚
866866 // https://learn.microsoft.com/zh-cn/dotnet/core/whats-new/dotnet-core-3-0#major-version-runtime-roll-forward
867867 process . env [ 'DOTNET_ROLL_FORWARD' ] = 'Major' ;
868+
869+ SettingManager . GetInstance ( ) . syncGlobalEnvVariablesToNodeEnv ( ) ;
868870}
869871
870872async function checkAndInstallRuntime ( ) {
You can’t perform that action at this time.
0 commit comments