mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-24 13:07:00 +01:00
Fixes #306 adding command line autocompletion. These are generated to: CARGO_TARGET_DIR/item-hash/out/. These will need to be packaged for distros later, it's unclear how we could use cargo install with these as cargo doesn't support arbitrary artefacts like this (yet?).
29 lines
703 B
Rust
29 lines
703 B
Rust
#![deny(warnings)]
|
|
#![warn(unused_extern_crates)]
|
|
#![deny(clippy::unwrap_used)]
|
|
#![deny(clippy::expect_used)]
|
|
#![deny(clippy::panic)]
|
|
#![deny(clippy::unreachable)]
|
|
#![deny(clippy::await_holding_lock)]
|
|
#![deny(clippy::needless_pass_by_value)]
|
|
#![deny(clippy::trivially_copy_pass_by_ref)]
|
|
|
|
use kanidm_cli::KanidmClientOpt;
|
|
use structopt::StructOpt;
|
|
|
|
fn main() {
|
|
let opt = KanidmClientOpt::from_args();
|
|
|
|
if opt.debug() {
|
|
::std::env::set_var(
|
|
"RUST_LOG",
|
|
"kanidm=debug,kanidm_client=debug,webauthn=debug",
|
|
);
|
|
} else {
|
|
::std::env::set_var("RUST_LOG", "kanidm=info,kanidm_client=info,webauthn=info");
|
|
}
|
|
env_logger::init();
|
|
|
|
opt.exec()
|
|
}
|