mirror of
https://github.com/TeFiLeDo/listload.git
synced 2024-11-01 01:56: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()
|
.ok()
|
||||||
.context("failed to initialize program directories")?;
|
.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 cfg = Config::read_from_default_file().context("failed to load config")?;
|
||||||
let downloader = cfg.downloader().context("failed to create downloader")?;
|
let downloader = cfg.downloader().context("failed to create downloader")?;
|
||||||
|
|
||||||
@ -37,8 +42,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
CMD::License => {
|
CMD::License => {
|
||||||
println!("{}", include_str!("../LICENSE"));
|
panic!("license passed first check");
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user