Skip to content
Snippets Groups Projects
Commit 059243ab authored by Robin Appelman's avatar Robin Appelman
Browse files

add version option

parent 7cf31220
No related branches found
No related tags found
No related merge requests found
......@@ -27,9 +27,13 @@ async fn main() -> Result<()> {
let (listen_cancel, listen_cancel_handle) = oneshot::channel();
let mut args = std::env::args();
let config = match args.nth(1) {
let config = match args.nth(1).as_deref() {
Some("--version") => {
println!("notify_push {}", env!("NOTIFY_PUSH_VERSION"));
return Ok(());
}
Some(file) => {
Config::from_file(&file).wrap_err("Failed to load config from nextcloud config file")?
Config::from_file(file).wrap_err("Failed to load config from nextcloud config file")?
}
None => Config::from_env().wrap_err("Failed to load config from environment variables")?,
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment