mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00

Not every executable has a `--version` flag. Let's check the exectuability instead. Note that on Windows we check if it is file only. There is a `is_executable` crate on crates.io, though that still depend on winapi so don't bother using it.
This crate is maintained by the Cargo team, primarily for use by Cargo and not intended for external use. This crate may make major changes to its APIs or be deprecated without warning.