Skip to content

Commit

Permalink
feat: add /usr/local/bin in search path
Browse files Browse the repository at this point in the history
Because OS like *BSD tends to install 3rd software into /usr/local/bin instead of /bin, so I think we should add it as the default search path
  • Loading branch information
aokblast committed Jan 4, 2024
1 parent 7393800 commit 4655721
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/sshx/src/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ pub async fn get_default_shell() -> String {
return shell;
}
}
for shell in ["/bin/bash", "/bin/sh"] {
for shell in [
"/bin/bash",
"/bin/sh",
"/usr/local/bin/bash",
"/usr/local/bin/sh",
] {
if fs::metadata(shell).await.is_ok() {
return shell.to_string();
}
Expand Down

0 comments on commit 4655721

Please sign in to comment.