ichwh-0.1.1 has been yanked.
ichwh - an async implementation of GNU which
NOTE: this crate is in early development. Only Linux is currently supported.
ichwh aims to be a fully-async clone of GNU which, compatible with the three major operating systems. The main job of which is to search for executables on the current PATH.
This crate is similar to the synchronous which crate.
Usage
In Cargo.toml:
= "*"
In your source files:
use which;
let path_to_python = which.await.unwrap;
assert_eq!;
Testing
Run tests with cargo test. The tests will create a set of temporary test folders. On unix systems, they are rooted at /tmp/ichwh-test-<num>, where <num> is the number of minutes since the epoch. If all tests pass, the folders will be cleaned up. Any failing tests will preserve their test folders for inspection and debugging.
Contributing
See CONTRIBUTING.md.