Skip to content
Snippets Groups Projects
Verified Commit 8f7a0f26 authored by nfontrod's avatar nfontrod
Browse files

src/remote.rs: update error message

parent 243ebc25
No related branches found
No related tags found
No related merge requests found
...@@ -55,7 +55,17 @@ pub fn parse_config(global: bool) -> Config { ...@@ -55,7 +55,17 @@ pub fn parse_config(global: bool) -> Config {
exit(1); 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.check_project_type(global, &config_file);
config_str config_str
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment