Normalize SSH timeout targets
Co-authored-by: codex <[email protected]>
This commit is contained in:
1 parent
ceb4fdc310
commit
2b84cc066b
2 files changed
+6
-3
No files matched your search
@@ -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));
|
||||
});
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
}),
|
||||
|
||||
Reference in new issue
Block a user