diff --git a/packages/ssh/src/command.test.ts b/packages/ssh/src/command.test.ts index fdc2fe6020..f87bc527d2 100644 --- a/packages/ssh/src/command.test.ts +++ b/packages/ssh/src/command.test.ts @@ -236,7 +236,7 @@ describe("ssh command", () => { Effect.result( runSshCommand( { - alias: "devbox", + alias: " ", hostname: "devbox.example.com", username: "julius", port: 2222, @@ -252,7 +252,10 @@ describe("ssh command", () => { assert.isTrue(Result.isFailure(result)); if (Result.isFailure(result)) { - assert.equal(result.failure.message, "SSH command timed out after 1ms for devbox."); + assert.equal( + result.failure.message, + "SSH command timed out after 1ms for devbox.example.com.", + ); } }).pipe(Effect.provide(processLayer)); }); diff --git a/packages/ssh/src/command.ts b/packages/ssh/src/command.ts index 2e5559ad28..8086b9e907 100644 --- a/packages/ssh/src/command.ts +++ b/packages/ssh/src/command.ts @@ -305,7 +305,7 @@ export const runSshCommand = Effect.fn("ssh/command.runSshCommand")(function* ( (input.preHostArgs?.length ?? 0) + 1 + (input.remoteCommandArgs?.length ?? 0), - target: target.alias || target.hostname, + target: target.alias.trim() || target.hostname.trim(), timeoutMs: input.timeoutMs ?? DEFAULT_SSH_COMMAND_TIMEOUT_MS, }); }),