Skip to content

Commit

Permalink
Override log opt when specified more than once (#1847)
Browse files Browse the repository at this point in the history
* Override log opt when specified more than once

Signed-off-by: Boaz Shuster <[email protected]>

* Add a comment about the log flag "override" behavior

Signed-off-by: Boaz Shuster <[email protected]>

---------

Signed-off-by: Boaz Shuster <[email protected]>
Co-authored-by: Boaz Shuster <[email protected]>
  • Loading branch information
boaz-quotient and boaz0 authored Apr 26, 2023
1 parent 0520425 commit f54ca68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/liboci-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ pub struct GlobalOpts {
// Example in future : '--debug change log level to debug. (default: "warn")'
#[clap(long)]
pub debug: bool,
#[clap(short, long)]
// Set a consistent behavior like in runc and crun: set log to the last given value
#[clap(short, long, overrides_with("log"))]
pub log: Option<PathBuf>,
#[clap(long)]
pub log_format: Option<String>,
Expand Down

0 comments on commit f54ca68

Please sign in to comment.