mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 12:33:40 +00:00
fix pack
This commit is contained in:
@@ -4,13 +4,35 @@ use embassy::Error;
|
||||
use rpc_toolkit::run_cli;
|
||||
|
||||
fn inner_main() -> Result<(), Error> {
|
||||
simple_logging::log_to_stderr(log::LevelFilter::Info);
|
||||
run_cli!(
|
||||
embassy::main_api,
|
||||
app => app.name("Embassy CLI")
|
||||
app => app
|
||||
.name("Embassy CLI")
|
||||
.arg(
|
||||
clap::Arg::with_name("config")
|
||||
.short("c")
|
||||
.long("config")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
clap::Arg::with_name("verbosity")
|
||||
.short("v")
|
||||
.multiple(true)
|
||||
.takes_value(false),
|
||||
)
|
||||
.arg(Arg::with_name("host").long("host").short("h").takes_value(true))
|
||||
.arg(Arg::with_name("port").long("port").short("p").takes_value(true)),
|
||||
matches => EitherContext::Cli(CliContext::init(matches)?),
|
||||
matches => {
|
||||
simple_logging::log_to_stderr(match matches.occurrences_of("verbosity") {
|
||||
0 => log::LevelFilter::Off,
|
||||
1 => log::LevelFilter::Error,
|
||||
2 => log::LevelFilter::Warn,
|
||||
3 => log::LevelFilter::Info,
|
||||
4 => log::LevelFilter::Debug,
|
||||
_ => log::LevelFilter::Trace,
|
||||
});
|
||||
EitherContext::Cli(CliContext::init(matches)?)
|
||||
},
|
||||
|code| if code < 0 { 1 } else { code }
|
||||
)
|
||||
}
|
||||
|
||||
@@ -4,11 +4,33 @@ use embassy::Error;
|
||||
use rpc_toolkit::run_cli;
|
||||
|
||||
fn inner_main() -> Result<(), Error> {
|
||||
simple_logging::log_to_stderr(log::LevelFilter::Info);
|
||||
run_cli!(
|
||||
embassy::portable_api,
|
||||
app => app.name("Embassy SDK"),
|
||||
matches => EitherContext::Cli(CliContext::init(matches)?),
|
||||
app => app
|
||||
.name("Embassy SDK")
|
||||
.arg(
|
||||
clap::Arg::with_name("config")
|
||||
.short("c")
|
||||
.long("config")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
clap::Arg::with_name("verbosity")
|
||||
.short("v")
|
||||
.multiple(true)
|
||||
.takes_value(false),
|
||||
),
|
||||
matches => {
|
||||
simple_logging::log_to_stderr(match matches.occurrences_of("verbosity") {
|
||||
0 => log::LevelFilter::Off,
|
||||
1 => log::LevelFilter::Error,
|
||||
2 => log::LevelFilter::Warn,
|
||||
3 => log::LevelFilter::Info,
|
||||
4 => log::LevelFilter::Debug,
|
||||
_ => log::LevelFilter::Trace,
|
||||
});
|
||||
EitherContext::Cli(CliContext::init(matches)?)
|
||||
},
|
||||
|code| if code < 0 { 1 } else { code }
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user