File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/client/interpreter/activation Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -147,8 +147,16 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
147147 const prevValue = previousEnv [ key ] ;
148148 if ( prevValue !== value ) {
149149 if ( value !== undefined ) {
150- traceVerbose ( `Setting environment variable ${ key } in collection to ${ value } ` ) ;
151- envVarCollection . replace ( key , value , { applyAtShellIntegration : true } ) ;
150+ if ( key === 'PS1' ) {
151+ traceVerbose ( `Prepending environment variable ${ key } in collection with ${ value } ` ) ;
152+ envVarCollection . prepend ( key , value , {
153+ applyAtShellIntegration : true ,
154+ applyAtProcessCreation : false ,
155+ } ) ;
156+ } else {
157+ traceVerbose ( `Setting environment variable ${ key } in collection to ${ value } ` ) ;
158+ envVarCollection . replace ( key , value , { applyAtShellIntegration : true } ) ;
159+ }
152160 } else {
153161 traceVerbose ( `Clearing environment variable ${ key } from collection` ) ;
154162 envVarCollection . delete ( key ) ;
You can’t perform that action at this time.
0 commit comments