mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 04:27:45 +00:00
fix up runcon and chcon for clap 3
This commit is contained in:
parent
55893f0e3d
commit
951f3bb689
2 changed files with 3 additions and 3 deletions
|
@ -72,7 +72,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
Err(r) => {
|
Err(r) => {
|
||||||
if let Error::CommandLine(r) = &r {
|
if let Error::CommandLine(r) = &r {
|
||||||
match r.kind {
|
match r.kind {
|
||||||
clap::ErrorKind::HelpDisplayed | clap::ErrorKind::VersionDisplayed => {
|
clap::ErrorKind::DisplayHelp | clap::ErrorKind::DisplayVersion => {
|
||||||
println!("{}", r);
|
println!("{}", r);
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,14 +48,14 @@ fn get_usage() -> String {
|
||||||
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
let usage = get_usage();
|
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) {
|
let options = match parse_command_line(config, args) {
|
||||||
Ok(r) => r,
|
Ok(r) => r,
|
||||||
Err(r) => {
|
Err(r) => {
|
||||||
if let Error::CommandLine(ref r) = r {
|
if let Error::CommandLine(ref r) = r {
|
||||||
match r.kind {
|
match r.kind {
|
||||||
clap::ErrorKind::HelpDisplayed | clap::ErrorKind::VersionDisplayed => {
|
clap::ErrorKind::DisplayHelp | clap::ErrorKind::DisplayVersion => {
|
||||||
println!("{}", r);
|
println!("{}", r);
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue