@@ -46,11 +46,11 @@ describe('pathFind', function () {
4646 let previousEnv : NodeJS . ProcessEnv
4747
4848 beforeEach ( function ( ) {
49- previousEnv = testutil . readEnv ( )
49+ previousEnv = testutil . copyEnv ( )
5050 } )
5151
5252 afterEach ( function ( ) {
53- testutil . setEnv ( previousEnv )
53+ process . env = previousEnv
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- testutil . setEnv ( testutil . envWithNewPath ( workspace . uri . fsPath ) )
64+ process . env = testutil . envWithNewPath ( 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- testutil . setEnv ( testutil . envWithNewPath ( workspace . uri . fsPath ) )
83+ process . env = testutil . envWithNewPath ( 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- testutil . setEnv ( testutil . envWithNewPath ( workspace . uri . fsPath ) )
102+ process . env = testutil . envWithNewPath ( workspace . uri . fsPath )
103103
104104 await testutil . createExecutableFile ( fakeSshPath , '' )
105105
0 commit comments