From f7a6f653b1b159943ae26607747c694d6d64c8ea Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Wed, 23 Oct 2024 16:02:55 -0400 Subject: [PATCH] Change override argument to optional --- sigem/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sigem/src/main.rs b/sigem/src/main.rs index e9d5c62..c3b22e0 100644 --- a/sigem/src/main.rs +++ b/sigem/src/main.rs @@ -24,8 +24,8 @@ struct Args { /// /// NOTE: If the file exists we will exit early to prevent wasted effort. /// NOTE: If the file is created while we are running it will still be overwritten. - #[arg(short, long, default_value_t = false)] - overwrite: bool, + #[arg(short, long)] + overwrite: Option, /// The external debug information file to use #[arg(short, long)] @@ -39,7 +39,7 @@ fn main() { // If no output file was given, just prepend binary with extension sbin let output_file = args.output.unwrap_or(args.binary.with_extension("sbin")); - if output_file.exists() && !args.overwrite { + if output_file.exists() && !args.overwrite.unwrap_or(false) { log::info!("Output file already exists, skipping... {:?}", output_file); return; }