mirror of
https://github.com/nushell/nushell.git
synced 2025-08-12 06:19:18 +02:00
Remove test-bins feature.
This commit is contained in:
22
src/main.rs
22
src/main.rs
@ -1,5 +1,6 @@
|
||||
use clap::{App, Arg};
|
||||
use log::LevelFilter;
|
||||
use nu_cli::utils::test_bins as binaries;
|
||||
use nu_cli::{create_default_context, EnvironmentSyncer};
|
||||
use std::error::Error;
|
||||
use std::fs::File;
|
||||
@ -16,6 +17,14 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
.possible_values(&["error", "warn", "info", "debug", "trace"])
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("testbin")
|
||||
.hidden(true)
|
||||
.long("testbin")
|
||||
.value_name("TESTBIN")
|
||||
.possible_values(&["cococo", "iecho", "fail", "nonu", "chop"])
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("commands")
|
||||
.short("c")
|
||||
@ -48,6 +57,19 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
if let Some(bin) = matches.value_of("testbin") {
|
||||
match bin {
|
||||
"cococo" => binaries::cococo(),
|
||||
"iecho" => binaries::iecho(),
|
||||
"fail" => binaries::fail(),
|
||||
"nonu" => binaries::nonu(),
|
||||
"chop" => binaries::chop(),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let loglevel = match matches.value_of("loglevel") {
|
||||
None => LevelFilter::Warn,
|
||||
Some("error") => LevelFilter::Error,
|
||||
|
Reference in New Issue
Block a user