Change pretend to dry-run
This commit is contained in:
parent
eef5633786
commit
fafe3707be
3 changed files with 5 additions and 5 deletions
|
|
@ -97,10 +97,10 @@ Note that this will not preserve the directory structure of the input files when
|
|||
.action(ArgAction::SetTrue),
|
||||
)
|
||||
.arg(
|
||||
Arg::new("pretend")
|
||||
Arg::new("dry-run")
|
||||
.help("Do not write any files, only show compression results")
|
||||
.short('P')
|
||||
.long("pretend")
|
||||
.short('d')
|
||||
.long("dry-run")
|
||||
.action(ArgAction::SetTrue),
|
||||
)
|
||||
.arg(
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ pub fn optimize(input: &InFile, output: &OutFile, opts: &Options) -> PngResult<(
|
|||
|
||||
match (output, input) {
|
||||
(OutFile::None, _) => {
|
||||
info!("{savings}: Running in pretend mode, no output");
|
||||
info!("{savings}: Dry run, no output");
|
||||
}
|
||||
(&OutFile::StdOut, _) | (&OutFile::Path { path: None, .. }, &InFile::StdIn) => {
|
||||
let mut buffer = BufWriter::new(stdout());
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ fn parse_opts_into_struct(
|
|||
None
|
||||
};
|
||||
|
||||
let out_file = if matches.get_flag("pretend") {
|
||||
let out_file = if matches.get_flag("dry-run") {
|
||||
OutFile::None
|
||||
} else if matches.get_flag("stdout") {
|
||||
OutFile::StdOut
|
||||
|
|
|
|||
Loading…
Reference in a new issue