- Commit
- 8d0830bbb288854fd0a56fdb79fe47169797a62f
- Parent
- 5b3da5c4fc8ba1e81f80ad9c56b65b93855406ee
- Author
- Pablo <pablo-escobar@riseup.net>
- Date
Updated an error message
Custum build of stapix for tikz.pablopie.xyz
Updated an error message
1 file changed, 4 insertions, 3 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | src/main.rs | 7 | 4 | 3 |
diff --git a/src/main.rs b/src/main.rs @@ -108,8 +108,8 @@ macro_rules! usage_config { fn main() -> ExitCode { let args: Vec<String> = env::args().collect(); - let config = match &args[..] { - [_, config] => config, + let (program, config) = match &args[..] { + [program, config] => (program, config), [program] => { error!("Expected 1 command line argument, found none"; newline = false); @@ -131,7 +131,8 @@ fn main() -> ExitCode { Err(err) => { error!("Couldn't open {config:?}: {err}", config = config, err = err; newline = false); - ExitCode::FAILURE + usage!(program); + ExitCode::FAILURE } // Error parsing the config file Ok(Err(err)) => {