#![warn(
missing_docs,
missing_debug_implementations,
missing_copy_implementations,
trivial_casts,
trivial_numeric_casts,
unsafe_code,
unstable_features,
unused_import_braces,
unused_qualifications
)]
mod eval;
use std::ffi::OsStr;
fn main() {
env_logger::init_from_env("CARGO_LOG");
let mut args = std::env::args_os().peekable();
args.next(); if args.peek().map(|s| s.as_os_str()) == Some(OsStr::new("eval")) {
args.next(); }
let cli = eval::cli().no_binary_name(true);
let matches = cli.get_matches_from(args);
let mut config = cargo::util::config::Config::default().unwrap_or_else(|e| {
let mut eval = cargo::core::shell::Shell::new();
cargo::exit_with_error(e.into(), &mut eval)
});
if let Err(e) = eval::exec(&matches, &mut config) {
cargo::exit_with_error(e, &mut config.shell())
}
}