added safety for overwriting configs
This commit is contained in:
parent
de3974725a
commit
5a7e5fae94
2 changed files with 10 additions and 2 deletions
|
@ -89,6 +89,7 @@ fn compilation_args() -> Vec<String> {
|
|||
"-Wall".to_string(),
|
||||
"-Wextra".to_string(),
|
||||
"-std=c99".to_string(),
|
||||
"-pedantic".to_string(),
|
||||
];
|
||||
if Config::get_local_or_default().strict_mode() {
|
||||
args.push("-Werror".to_string());
|
||||
|
@ -138,7 +139,8 @@ fn main() {
|
|||
} => {
|
||||
let path =
|
||||
path.unwrap_or_else(|| env::current_dir().unwrap().to_str().unwrap().to_string());
|
||||
config::create(path.clone(), prefix);
|
||||
let prefix = prefix.trim().trim_end_matches('*');
|
||||
config::create(path.clone(), prefix.to_string());
|
||||
if tests {
|
||||
config::create_test(path);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue