platform::tests::test_command_exists_known asserts command_exists("ls"), but on Windows command_exists shells out to where.exe, and ls is not a real executable there (it is a PowerShell alias and a Git Bash builtin/coreutils binary that is not necessarily on PATH). The test comment even says "which itself should always exist on unix", so the assertion encodes a unix assumption.
Observed while working #52: cargo test on Windows 11 gives
test platform::tests::test_command_exists_known ... FAILED
assertion failed: command_exists("ls")
CI does not catch this because it runs on Linux.
Fix options: pick a command that exists on both platforms per cfg (e.g. where.exe itself on Windows, ls elsewhere), or gate the current assertion to #[cfg(unix)] with a Windows counterpart.
platform::tests::test_command_exists_knownassertscommand_exists("ls"), but on Windowscommand_existsshells out towhere.exe, andlsis not a real executable there (it is a PowerShell alias and a Git Bash builtin/coreutils binary that is not necessarily on PATH). The test comment even says "whichitself should always exist on unix", so the assertion encodes a unix assumption.Observed while working #52:
cargo teston Windows 11 givesCI does not catch this because it runs on Linux.
Fix options: pick a command that exists on both platforms per cfg (e.g.
where.exeitself on Windows,lselsewhere), or gate the current assertion to#[cfg(unix)]with a Windows counterpart.