You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is very minor, but when I first ran v3 I saw the first and last line and automatically assumed binwalk was broken without reading the panic message.
Almost every other tool I use prints the help menu by default when run with no arguments.
I think just exiting rather than panicking would also be more consistent with what binwalk currently prints when invalid arguments are passed
Thoughts on switching panic! for one of the following?
diff --git a/src/main.rs b/src/main.rs
index ed46ef5..50e22e7 100644
--- a/src/main.rs+++ b/src/main.rs@@ -68,7 +68,8 @@ fn main() {
// If --list was not specified, a target file must be provided
if cliargs.file_name.is_none() {
- panic!("No target file name specified! Try --help.");+ eprintln!("No target file name specified! Try --help.");+ process::exit(1);
}
let mut json_logger = json::JsonLogger::new(cliargs.log);
This is very minor, but when I first ran v3 I saw the first and last line and automatically assumed binwalk was broken without reading the panic message.
Almost every other tool I use prints the help menu by default when run with no arguments.
I think just exiting rather than panicking would also be more consistent with what binwalk currently prints when invalid arguments are passed
Thoughts on switching
panic!
for one of the following?Error and exit here
Print help menu and exit here
If one of these is something you think is reasonable, I can formalize it in a PR
The text was updated successfully, but these errors were encountered: