Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uucore: error on negative interval in parse_time::from_str() #3292

Merged
merged 1 commit into from
Mar 22, 2022

Conversation

jfinkels
Copy link
Collaborator

Return an error when a negative interval is provided as the argument
to uucore::parse_time::from_str(), since a Duration should only be
non-negative.

This corrects the behavior of timeout and sleep to match that of GNU. For example,

$ sleep -- -1
sleep: invalid time interval ‘-1’
Try 'sleep --help' for more information.

Return an error when a negative interval is provided as the argument
to `uucore::parse_time::from_str()`, since a `Duration` should only be
non-negative.
@sylvestre sylvestre merged commit b50d96e into uutils:main Mar 22, 2022
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