Add sshd path check for bridge

This commit is contained in:
crschnick 2024-09-18 04:17:10 +00:00
parent d5e9b64166
commit cfed0302bc

View file

@ -178,8 +178,11 @@ public class SshLocalBridge {
.resolve("sshd")
.toString();
} else {
var exec = sc.executeSimpleStringCommand(sc.getShellDialect().getWhichCommand("sshd"));
return exec;
var exec = sc.command(sc.getShellDialect().getWhichCommand("sshd")).readStdoutIfPossible();
if (exec.isEmpty()) {
throw ErrorEvent.expected(new IllegalStateException("No sshd executable found in PATH. The SSH terminal bridge requires a local ssh server"));
}
return exec.get();
}
}