Drop permissions of a CLI using structopt.
```rust,no_run use clap::Parser;
struct Cli { #[clap(flatten)] permission: clappermissionflag::Permission, }
fn main() -> Result<(), Box
This crate depends on Unix features - on other platforms a stub implementation which has no flags and always succeeds if used.
```txt clap-permission-flag 0.2.0 Yoshua Wuyts yoshuawuyts@gmail.com Drop permissions of a CLI using structopt
USAGE: main [OPTIONS]
FLAGS: -h, --help Prints help information -V, --version Prints version information
OPTIONS:
--chroot
sh
$ cargo add clap-permission-flag
Since --chroot
may not be suitable for all applications, it is behind the
chroot
feature and must be enabled explicitly:
toml
[dependencies.clap-permission-flag]
version = "0.2"
features = ["chroot"]
MIT OR Apache-2.0