Skip to content

Conversation

cakebaker
Copy link
Contributor

When using -d multiple times, our implementation fails with an "argument cannot be used multiple times" error whereas GNU date allows it and uses the last value.

$ cargo run -q date -d "invalid" -d "2000-02-02"
error: the argument '--date <STRING>' cannot be used multiple times

For more information, try '--help'.

$ date -d "invalid" -d "2000-02-02"
Wed Feb  2 00:00:00 CET 2000

This PR fixes the issue.

Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)

@sylvestre sylvestre merged commit 59fd744 into uutils:main Aug 22, 2025
92 checks passed
@cakebaker cakebaker deleted the date_allow_multiple_d branch August 22, 2025 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants