Skip to content

Commit

Permalink
Change override argument to optional
Browse files Browse the repository at this point in the history
  • Loading branch information
emesare committed Oct 23, 2024
1 parent db84122 commit f7a6f65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sigem/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool>,

/// The external debug information file to use
#[arg(short, long)]
Expand All @@ -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;
}
Expand Down

0 comments on commit f7a6f65

Please sign in to comment.