Skip to content

Commit eca8baf

Browse files
authored
Merge pull request #6147 from sylvestre/tail-pid
tail: allow multiple usage of --pid to match upstream (regression of …
2 parents 4a64337 + f0286eb commit eca8baf

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/uu/tail/src/args.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,8 @@ pub fn uu_app() -> Command {
510510
Arg::new(options::PID)
511511
.long(options::PID)
512512
.value_name("PID")
513-
.help("With -f, terminate after process ID, PID dies"),
513+
.help("With -f, terminate after process ID, PID dies")
514+
.overrides_with(options::PID),
514515
)
515516
.arg(
516517
Arg::new(options::verbosity::QUIET)

tests/by-util/test_tail.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3908,6 +3908,13 @@ fn test_args_when_settings_check_warnings_then_shows_warnings() {
39083908
.args(&["--pid=1000", "--retry", "data"])
39093909
.stderr_to_stdout()
39103910
.run()
3911+
.stdout_only(&expected_stdout)
3912+
.success();
3913+
scene
3914+
.ucmd()
3915+
.args(&["--pid=1000", "--pid=1000", "--retry", "data"])
3916+
.stderr_to_stdout()
3917+
.run()
39113918
.stdout_only(expected_stdout)
39123919
.success();
39133920
}

0 commit comments

Comments
 (0)