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

CLI to take days as a unit of time #20477

Merged
merged 2 commits into from
May 4, 2023
Merged

Conversation

hghaf099
Copy link
Contributor

@hghaf099 hghaf099 commented May 2, 2023

For an example: vault token create -policy=mypolicy -ttl=1d
fails with error:
invalid value "1d" for flag -ttl: time: unknown unit "ds" in duration "1ds"

Currently, the CLI uses time.ParseDuration(appendDurationSuffix(s)) instead of parseutil.ParseDurationSecond(s). The fix is to use the latter instead.

Addresses #19815

@hghaf099 hghaf099 requested a review from VioletHynes May 2, 2023 21:39
Copy link
Contributor

@VioletHynes VioletHynes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

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