File tree 1 file changed +12
-8
lines changed
1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -284,15 +284,19 @@ export class SessionManager {
284
284
"-Command" ,
285
285
"& '" + startScriptPath + "' " + startArgs ) ;
286
286
287
- // Set DEVPATH environment variable if necessary
288
287
if ( isWindowsDevBuild ) {
289
- // The development build looks for this environment variable to
290
- // know where to find its assemblies
291
- process . env . DEVPATH = path . dirname ( powerShellExePath ) ;
292
- }
293
- else {
294
- // It's safe to delete this variable even if it doesn't exist
295
- delete process . env . DEVPATH ;
288
+ // Windows PowerShell development builds need the DEVPATH environment
289
+ // variable set to the folder where development binaries are held
290
+
291
+ // NOTE: This batch file approach is needed temporarily until VS Code's
292
+ // createTerminal API gets an argument for setting environment variables
293
+ // on the launched process.
294
+ var batScriptPath = path . resolve ( __dirname , '../sessions/powershell.bat' ) ;
295
+ fs . writeFileSync (
296
+ batScriptPath ,
297
+ `@set DEVPATH=${ path . dirname ( powerShellExePath ) } \r\n@${ powerShellExePath } %*` ) ;
298
+
299
+ powerShellExePath = batScriptPath ;
296
300
}
297
301
298
302
// Make sure no old session file exists
You can’t perform that action at this time.
0 commit comments