From 0d176bca40582a492e85ec9a1517505c4d8896c0 Mon Sep 17 00:00:00 2001 From: minish Date: Fri, 8 Dec 2023 13:08:38 -0500 Subject: [PATCH] --config is now a required switch --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 413354a..25ac623 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,8 @@ mod view; #[derive(Parser, Debug)] struct Args { /// The path to configuration file - config: Option, + #[arg(short, long, value_name = "file")] + config: PathBuf, } #[tokio::main] @@ -30,7 +31,7 @@ async fn main() { let args = Args::parse(); // read & parse config - let config_str = fs::read_to_string(args.config.unwrap_or("./breeze.toml".into())) + let config_str = fs::read_to_string(args.config) .await .expect("failed to read config file! make sure it exists and you have read permissions");