Skip to content

Commit ce3dd45

Browse files
committed
remove quotes from windows output
1 parent 43f9f24 commit ce3dd45

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/core/src/test/shared/extensions/ssh.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ function echoEnvVarsCmd(varNames: string[]) {
4343
}
4444

4545
function parseOutput(output: string) {
46-
// On Windows the final line is the result of the script.
47-
return isWin() ? output.split('\n').at(-1) : output
46+
// On Windows the final line is the result of the script, and it wraps result in `"`
47+
return isWin() ? output.split('\n').at(-1)?.replace('"', '') : output
4848
}
4949

5050
describe('testSshConnection', function () {
@@ -72,7 +72,7 @@ describe('testSshConnection', function () {
7272

7373
await createExecutableFile(sshPath, echoEnvVarsCmd(['MY_VAR']))
7474
const r = await testSshConnection(process, 'localhost', sshPath, 'test-user', session)
75-
assert.strictEqual(r.stdout, 'yes')
75+
assert.strictEqual(parseOutput(r.stdout), 'yes')
7676
await createExecutableFile(sshPath, echoEnvVarsCmd(['UNDEFINED_VAR']))
7777
const r2 = await testSshConnection(process, 'localhost', sshPath, 'test-user', session)
7878

0 commit comments

Comments
 (0)