Skip to content

Commit

Permalink
tail: allow multiple usage of --pid to match upstream (regression of …
Browse files Browse the repository at this point in the history
…9.5)

tested by tests/tail/pid
  • Loading branch information
sylvestre committed Mar 30, 2024
1 parent 8ae8de0 commit f0286eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/uu/tail/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,8 @@ pub fn uu_app() -> Command {
Arg::new(options::PID)
.long(options::PID)
.value_name("PID")
.help("With -f, terminate after process ID, PID dies"),
.help("With -f, terminate after process ID, PID dies")
.overrides_with(options::PID),
)
.arg(
Arg::new(options::verbosity::QUIET)
Expand Down
7 changes: 7 additions & 0 deletions tests/by-util/test_tail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3908,6 +3908,13 @@ fn test_args_when_settings_check_warnings_then_shows_warnings() {
.args(&["--pid=1000", "--retry", "data"])
.stderr_to_stdout()
.run()
.stdout_only(&expected_stdout)
.success();
scene
.ucmd()
.args(&["--pid=1000", "--pid=1000", "--retry", "data"])
.stderr_to_stdout()
.run()
.stdout_only(expected_stdout)
.success();
}
Expand Down

0 comments on commit f0286eb

Please sign in to comment.