diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 518ac7a..6137106 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -56,7 +56,7 @@ jobs: - name: Run tests env: - RUST_BACKTRACE: "1" + RUST_BACKTRACE: "full" run: just test - uses: taiki-e/install-action@v2 diff --git a/src/lib.rs b/src/lib.rs index e285239..1fca52d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -42,11 +42,12 @@ impl CommandRunner { } pub fn is_executable(&self) -> bool { - Command::new("command") - .args(["-v", &self.command]) - .output() - .map(|output| output.status.success()) - .unwrap_or(false) + let cmd = format!("command -v {}", &self.command); + let result = Command::new("sh").args(["-c", &cmd]).output(); + match result { + Ok(output) => output.status.success(), + Err(_) => false, + } } }