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

UsageError typo on --animate-interval #1814

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

imJoshuaRice
Copy link

UsageError has a typo, this can cause confusion.

For example under the context of trying to export d2 to .gif for the first time, my flow was:

I checked the Documentation which states correct usage: d2 in.d2 out.gif

d2 in.d2 out.gif

err: bad usage: -animate-interval must be greater than 0 for .gif outputs.

I then followed the error to correct the input, and received a second error:

d2 in.d2 out.gif -animate-interval 1

err: bad usage: failed to parse flags: unknown shorthand flag: 'a' in -animate-interval
err: Run with --help to see usage.

The correct usage is d2 in.d2 out.gif --animate-interval <interval as number>
The documentation could also benefit from a refresh in this regard.

Copy link
Collaborator

@alixander alixander left a comment

Choose a reason for hiding this comment

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

lgtm, thank you. can you sign your commit please? We have it as an org-wide setting

@imJoshuaRice
Copy link
Author

lgtm, thank you. can you sign your commit please? We have it as an org-wide setting

Done, thanks.

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