Skip to content

Commit a28c33e

Browse files
committed
rewrite only the PATH var
1 parent 7e7b0cb commit a28c33e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/core/src/test/shared/utilities/pathFind.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ describe('pathFind', function () {
4343
})
4444

4545
describe('findSshPath', function () {
46-
let previousEnv: NodeJS.ProcessEnv
46+
let previousPath: string
4747

4848
beforeEach(function () {
49-
previousEnv = testutil.copyEnv()
49+
previousPath = testutil.copyEnv().PATH!
5050
})
5151

5252
afterEach(function () {
53-
process.env = previousEnv
53+
process.env.PATH = previousPath
5454
})
5555

5656
it('first tries ssh in $PATH (Non-Windows)', async function () {

packages/core/src/test/shared/utilities/testUtils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe('setEnv', function () {
1717
assert.strictEqual(copyEnv().PATH, fakePath)
1818

1919
process.env.PATH = originalPath
20-
assert.strictEqual(copyEnv(), originalPath)
20+
assert.strictEqual(copyEnv().PATH, originalPath)
2121
})
2222
})
2323

0 commit comments

Comments
 (0)