mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-28 00:20:00 -07:00
Revert back to the CLI using Clap more directly
This commit is contained in:
committed by
Markus Unterwaditzer
parent
f6e118a5cc
commit
485d1a99f6
@@ -327,3 +327,12 @@ pub fn run_with_callback<'a>(
|
||||
pub fn version() -> &'static str {
|
||||
env!("CARGO_PKG_VERSION")
|
||||
}
|
||||
|
||||
/// Run the CLI installer
|
||||
///
|
||||
/// This function is public so the binary can call it, library users should use `run_with_callback`
|
||||
/// instead.
|
||||
pub async fn main_cli() -> Result<(), Error> {
|
||||
let args = Args::parse();
|
||||
run(args).await
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
fn main() {
|
||||
let args: Vec<String> = std::env::args().skip(1).collect();
|
||||
|
||||
if let Err(e) = installer::run_with_callback(args.iter().map(|s| s.as_str()), None) {
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
async fn main() {
|
||||
if let Err(e) = installer::main_cli().await {
|
||||
eprintln!("{e:?}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user