@@ -46,11 +46,11 @@ describe('pathFind', function () {
4646 let previousPath : string
4747
4848 beforeEach ( function ( ) {
49- previousPath = testutil . copyEnv ( ) . PATH !
49+ previousPath = testutil . getEnvPath ( testutil . copyEnv ( ) )
5050 } )
5151
5252 afterEach ( function ( ) {
53- process . env . PATH = previousPath
53+ testutil . setEnvPath ( previousPath )
5454 } )
5555
5656 it ( 'first tries ssh in $PATH (Non-Windows)' , async function ( ) {
@@ -61,7 +61,7 @@ describe('pathFind', function () {
6161 const workspace = await testutil . createTestWorkspaceFolder ( )
6262 const fakeSshPath = path . join ( workspace . uri . fsPath , `ssh` )
6363
64- process . env . PATH = workspace . uri . fsPath
64+ testutil . setEnvPath ( workspace . uri . fsPath )
6565 const firstResult = await findSshPath ( false )
6666
6767 await testutil . createExecutableFile ( fakeSshPath , '' )
@@ -80,7 +80,7 @@ describe('pathFind', function () {
8080 const workspace = await testutil . createTestWorkspaceFolder ( )
8181 const fakeSshPath = path . join ( workspace . uri . fsPath , `ssh` )
8282
83- process . env . PATH = workspace . uri . fsPath
83+ testutil . setEnvPath ( workspace . uri . fsPath )
8484
8585 await testutil . createExecutableFile ( fakeSshPath , '' )
8686
@@ -99,7 +99,7 @@ describe('pathFind', function () {
9999 // We move the ssh to a temp directory temporarily to test if cache works.
100100 const fakeSshPath = path . join ( workspace . uri . fsPath , `ssh` )
101101
102- process . env . PATH = workspace . uri . fsPath
102+ testutil . setEnvPath ( workspace . uri . fsPath )
103103
104104 await testutil . createExecutableFile ( fakeSshPath , '' )
105105
0 commit comments