Skip to content

Commit

Permalink
fix: --output - was ignored if output is given in the config
Browse files Browse the repository at this point in the history
  • Loading branch information
threadexio committed Jan 2, 2025
1 parent 2d57021 commit 5cfff12
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,17 @@ impl Config {

let output_file = args
.value::<PathBuf>("output_file")
.and_then(path_not_stdio)
.cloned()
.map(|x| path_not_stdio(x).cloned())
.or_else(|| {
file.as_ref()
let x = file
.as_ref()
.and_then(|x| x.bundle.as_ref())
.and_then(|x| x.output_file.as_ref())
.cloned()
});
.cloned();

Some(x)
})
.unwrap_or(None);

let entry = args.value::<PathBuf>("entry").unwrap().clone();

Expand Down

0 comments on commit 5cfff12

Please sign in to comment.