diff --git a/src/remote.rs b/src/remote.rs index 4b09bdcd65b1f0a9fc3071c5adb6a1dd6c27bae3..269686f21fa260751dc0452c2f1a45d57d596b0c 100644 --- a/src/remote.rs +++ b/src/remote.rs @@ -55,7 +55,17 @@ pub fn parse_config(global: bool) -> Config { exit(1); } } - let config_str: Config = toml::from_str(&content).unwrap(); + let config_str: Config = match toml::from_str(&content) { + Ok(config) => config, + Err(_) => { + eprintln!( + "{}: bad {} configuration file !", + "error".red(), + &config_file.display() + ); + exit(1); + } + }; config_str.check_project_type(global, &config_file); config_str }