mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-06-02 18:14:08 -04:00
verify if config file exists
This commit is contained in:
parent
d982f84e39
commit
74edf9c26b
|
@ -25,8 +25,9 @@ fn main() {
|
|||
|
||||
// get config file name from args
|
||||
let config_file_arg = args.config;
|
||||
|
||||
// Quits if config file path does not exist
|
||||
let config_file_path: &OsStr = OsStr::new(config_file_arg);
|
||||
let config_file_path = config_file_arg.as_ref().map(|x| &**x).unwrap()
|
||||
if !Path::new(&config_file_path).exists() {
|
||||
eprintln!("Config file not found: {}", &config_file_path);
|
||||
process::exit(1);
|
||||
|
|
Loading…
Reference in New Issue
Block a user