Skip to content

Commit

Permalink
cp: use new clap error mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
tertsdiepraam committed May 4, 2022
1 parent 30d9ed3 commit 9f143dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uu/cp/src/cp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ use std::path::{Path, PathBuf, StripPrefixError};
use std::str::FromStr;
use std::string::ToString;
use uucore::backup_control::{self, BackupMode};
use uucore::error::{set_exit_code, ExitCode, UError, UResult};
use uucore::error::{set_exit_code, ExitCode, UClapError, UError, UResult};
use uucore::fs::{canonicalize, MissingHandling, ResolveMode};
use walkdir::WalkDir;

Expand Down Expand Up @@ -485,7 +485,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
app.print_help()?;
}
clap::ErrorKind::DisplayVersion => println!("{}", app.render_version()),
_ => return Err(Box::new(e)),
_ => return Err(Box::new(e.with_exit_code(1))),
};
} else if let Ok(matches) = matches {
let options = Options::from_matches(&matches)?;
Expand Down

0 comments on commit 9f143dd

Please sign in to comment.