aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-07-22 03:12:13 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-07-22 03:12:13 +0300
commit08640bb3ddc0a9c299e855d6a459d2f82970cf86 (patch)
tree0c3d2c12f7778f1fa5b0ae09de8768555b39315c /src
parent0f161fac287011b3e216383e2b8482f049fd6a7b (diff)
fix: fall back to sh for remote path discovery
refs #1201
Diffstat (limited to 'src')
-rw-r--r--src/remote/unix.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/remote/unix.rs b/src/remote/unix.rs
index 813091ba..6fe927c1 100644
--- a/src/remote/unix.rs
+++ b/src/remote/unix.rs
@@ -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);
}