@@ -248,12 +248,13 @@ suite('Terminal Environment Variable Collection Service', () => {
248
248
assert . deepEqual ( opts , { applyAtProcessCreation : true , applyAtShellIntegration : true } ) ;
249
249
} ) ;
250
250
251
- test ( 'Prepend full PATH otherwise' , async ( ) => {
251
+ test ( 'Prepend full PATH with separator otherwise' , async ( ) => {
252
252
const processEnv = { PATH : 'hello/1/2/3' } ;
253
253
reset ( environmentActivationService ) ;
254
254
when ( environmentActivationService . getProcessEnvironmentVariables ( anything ( ) , anything ( ) ) ) . thenResolve (
255
255
processEnv ,
256
256
) ;
257
+ const separator = getOSType ( ) === OSType . Windows ? ';' : ':' ;
257
258
const finalPath = 'hello/3/2/1' ;
258
259
const envVars : NodeJS . ProcessEnv = { PATH : finalPath } ;
259
260
when (
@@ -275,7 +276,7 @@ suite('Terminal Environment Variable Collection Service', () => {
275
276
await terminalEnvVarCollectionService . _applyCollection ( undefined , customShell ) ;
276
277
277
278
verify ( collection . clear ( ) ) . once ( ) ;
278
- verify ( collection . prepend ( 'PATH' , finalPath , anything ( ) ) ) . once ( ) ;
279
+ verify ( collection . prepend ( 'PATH' , ` ${ finalPath } ${ separator } ` , anything ( ) ) ) . once ( ) ;
279
280
verify ( collection . replace ( 'PATH' , anything ( ) , anything ( ) ) ) . never ( ) ;
280
281
assert . deepEqual ( opts , { applyAtProcessCreation : true , applyAtShellIntegration : true } ) ;
281
282
} ) ;
0 commit comments