diff --git a/src/uu/nohup/Cargo.toml b/src/uu/nohup/Cargo.toml index 23fcc1234..5603d96c0 100644 --- a/src/uu/nohup/Cargo.toml +++ b/src/uu/nohup/Cargo.toml @@ -15,7 +15,7 @@ edition = "2021" path = "src/nohup.rs" [dependencies] -clap = { version = "3.2", features = ["wrap_help", "cargo"] } +clap = { version = "4.0", features = ["wrap_help", "cargo"] } libc = "0.2.135" atty = "0.2" uucore = { version=">=0.0.16", package="uucore", path="../../uucore", features=["fs"] } diff --git a/src/uu/nohup/src/nohup.rs b/src/uu/nohup/src/nohup.rs index ddc5b043c..78596985e 100644 --- a/src/uu/nohup/src/nohup.rs +++ b/src/uu/nohup/src/nohup.rs @@ -10,7 +10,7 @@ #[macro_use] extern crate uucore; -use clap::{crate_version, Arg, Command}; +use clap::{crate_version, Arg, ArgAction, Command}; use libc::{c_char, dup2, execvp, signal}; use libc::{SIGHUP, SIG_IGN}; use std::env; @@ -114,7 +114,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> { Ok(()) } -pub fn uu_app<'a>() -> Command<'a> { +pub fn uu_app() -> Command { Command::new(uucore::util_name()) .version(crate_version!()) .about(ABOUT) @@ -124,7 +124,7 @@ pub fn uu_app<'a>() -> Command<'a> { Arg::new(options::CMD) .hide(true) .required(true) - .multiple_occurrences(true) + .action(ArgAction::Append) .value_hint(clap::ValueHint::CommandName), ) .trailing_var_arg(true)