diff --git a/Cargo.lock b/Cargo.lock index 6e1f395..5f90b0a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1283,7 +1283,7 @@ dependencies = [ [[package]] name = "wttrbar" -version = "0.7.1" +version = "0.8.0" dependencies = [ "chrono", "clap", diff --git a/Cargo.toml b/Cargo.toml index 58218ca..1e9f81f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wttrbar" -version = "0.7.1" +version = "0.8.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/main.rs b/main.rs index 60216fb..9dfcd6e 100644 --- a/main.rs +++ b/main.rs @@ -2,6 +2,7 @@ use core::time; use std::collections::HashMap; use std::fs::{metadata, read_to_string, File}; use std::io::Write; +use std::process::exit; use std::thread; use std::time::{Duration, SystemTime}; @@ -159,7 +160,8 @@ fn main() { thread::sleep(time::Duration::from_millis(500 * iterations)); if iterations == threshold { - panic!("No response from endpoint!"); + println!("{{\"text\":\"⛓️‍💥\", \"tooltip\":\"cannot access wttr.in\"}}"); + exit(0) } } }