1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 03:57:44 +00:00

fix up runcon and chcon for clap 3

This commit is contained in:
Terts Diepraam 2022-01-17 16:52:17 +01:00
parent 55893f0e3d
commit 951f3bb689
2 changed files with 3 additions and 3 deletions

View file

@ -72,7 +72,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
Err(r) => {
if let Error::CommandLine(r) = &r {
match r.kind {
clap::ErrorKind::HelpDisplayed | clap::ErrorKind::VersionDisplayed => {
clap::ErrorKind::DisplayHelp | clap::ErrorKind::DisplayVersion => {
println!("{}", r);
return Ok(());
}

View file

@ -48,14 +48,14 @@ fn get_usage() -> String {
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
let usage = get_usage();
let config = uu_app().usage(usage.as_ref());
let config = uu_app().override_usage(usage.as_ref());
let options = match parse_command_line(config, args) {
Ok(r) => r,
Err(r) => {
if let Error::CommandLine(ref r) = r {
match r.kind {
clap::ErrorKind::HelpDisplayed | clap::ErrorKind::VersionDisplayed => {
clap::ErrorKind::DisplayHelp | clap::ErrorKind::DisplayVersion => {
println!("{}", r);
return Ok(());
}