diff options
Diffstat (limited to 'base/src')
-rw-r--r-- | base/src/lib.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/base/src/lib.rs b/base/src/lib.rs index 48d3b37..015b62b 100644 --- a/base/src/lib.rs +++ b/base/src/lib.rs @@ -19,7 +19,11 @@ use std::{fs::File, path::PathBuf, sync::LazyLock}; pub static CONF: LazyLock<GlobalConfig> = LazyLock::new(|| { serde_yaml::from_reader( File::open(std::env::var("JELLYTHING_CONFIG").unwrap_or_else(|_| { - if std::env::args().nth(0) == Some("jellything".to_string()) { + if std::env::args() + .nth(0) + .unwrap_or_default() + .ends_with("jellything") + { std::env::args().nth(1).expect( "First argument or JELLYTHING_CONFIG must specify the configuration to use.", ) |