fix(shell-command): remove needless path borrow

This commit is contained in:
Felipe Coury
2026-06-12 12:36:49 -07:00
parent 5a1b3d2325
commit a5f85d7905
+1 -1
View File
@@ -112,7 +112,7 @@ pub fn extract_bash_command(command: &[String]) -> Option<(&str, &str)> {
fn is_recognised_bash_lc_invocation(shell: &str, flag: &str) -> bool {
matches!(flag, "-lc" | "-c")
&& matches!(
detect_shell_type(&PathBuf::from(shell)),
detect_shell_type(PathBuf::from(shell)),
Some(ShellType::Zsh) | Some(ShellType::Bash) | Some(ShellType::Sh)
)
}