File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver {
50
50
return {
51
51
version : '' /* We don't need to know the version - we've already verified its high enough */ ,
52
52
path : dotnetPath ,
53
- env : process . env ,
53
+ env : this . getEnvironmentVariables ( dotnetPath ) ,
54
54
} ;
55
55
}
56
56
}
@@ -67,6 +67,14 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver {
67
67
throw new Error ( `Cannot find dotnet path '${ dotnetExecutablePath } '` ) ;
68
68
}
69
69
70
+ return {
71
+ version : '' /* We don't need to know the version - we've already downloaded the correct one */ ,
72
+ path : dotnetExecutablePath ,
73
+ env : this . getEnvironmentVariables ( dotnetExecutablePath ) ,
74
+ } ;
75
+ }
76
+
77
+ private getEnvironmentVariables ( dotnetExecutablePath : string ) : NodeJS . ProcessEnv {
70
78
// Take care to always run .NET processes on the runtime that we intend.
71
79
// The dotnet.exe we point to should not go looking for other runtimes.
72
80
const env : NodeJS . ProcessEnv = { ...process . env } ;
@@ -86,11 +94,7 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver {
86
94
env . DOTNET_DbgMiniDumpName = path . join ( languageServerOptions . crashDumpPath , '%e.%p.dmp' ) ;
87
95
}
88
96
89
- return {
90
- version : '' /* We don't need to know the version - we've already downloaded the correct one */ ,
91
- path : dotnetExecutablePath ,
92
- env : process . env ,
93
- } ;
97
+ return env ;
94
98
}
95
99
96
100
/**
You can’t perform that action at this time.
0 commit comments