mirror of
https://github.com/herdrdev/herdr.git
synced 2026-09-22 00:01:06 +00:00
@@ -842,6 +842,16 @@ fn remote_binary_on_path_any(
|
||||
remote_herdr: &RemoteHerdr,
|
||||
) -> io::Result<Option<RemoteHerdr>> {
|
||||
let output = ssh.user_shell_output("command -v herdr")?;
|
||||
if output.status.success() {
|
||||
let stdout = String::from_utf8_lossy(&output.stdout);
|
||||
if let Some(candidate) = remote_herdr_from_path_discovery(remote_herdr, &stdout) {
|
||||
return Ok(Some(candidate));
|
||||
}
|
||||
}
|
||||
|
||||
// Non-POSIX login shells such as xonsh reject `command -v`; retry through
|
||||
// /bin/sh while retaining the login-shell probe for shell-initialized PATHs.
|
||||
let output = ssh.sh_output("command -v herdr\n")?;
|
||||
if !output.status.success() {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user