mirror of
https://github.com/TeFiLeDo/listload.git
synced 2024-11-23 12:46:17 +01:00
early license printing
This commit is contained in:
parent
5b9cc2f99d
commit
5233cd679a
10
src/main.rs
10
src/main.rs
@ -27,7 +27,12 @@ fn main() -> anyhow::Result<()> {
|
||||
.ok()
|
||||
.context("failed to initialize program directories")?;
|
||||
|
||||
// initialize downloading
|
||||
if let CMD::License = cli.command {
|
||||
println!("{}", include_str!("../LICENSE"));
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
// prepare for operation
|
||||
let cfg = Config::read_from_default_file().context("failed to load config")?;
|
||||
let downloader = cfg.downloader().context("failed to create downloader")?;
|
||||
|
||||
@ -37,8 +42,7 @@ fn main() -> anyhow::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
CMD::License => {
|
||||
println!("{}", include_str!("../LICENSE"));
|
||||
Ok(())
|
||||
panic!("license passed first check");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user