Skip to content

Commit

Permalink
UsageError typo on --animate-interval
Browse files Browse the repository at this point in the history
  • Loading branch information
imJoshuaRice committed Feb 3, 2024
1 parent 1e5d8fa commit 90beb60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions d2cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ func Run(ctx context.Context, ms *xmain.State) (err error) {
if outputPath != "-" {
outputPath = ms.AbsPath(outputPath)
if *animateIntervalFlag > 0 && !outputFormat.supportsAnimation() {
return xmain.UsageErrorf("-animate-interval can only be used when exporting to SVG or GIF.\nYou provided: %s", filepath.Ext(outputPath))
return xmain.UsageErrorf("--animate-interval can only be used when exporting to SVG or GIF.\nYou provided: %s", filepath.Ext(outputPath))
} else if *animateIntervalFlag <= 0 && outputFormat.requiresAnimationInterval() {
return xmain.UsageErrorf("-animate-interval must be greater than 0 for %s outputs.\nYou provided: %d", outputFormat, *animateIntervalFlag)
return xmain.UsageErrorf("--animate-interval must be greater than 0 for %s outputs.\nYou provided: %d", outputFormat, *animateIntervalFlag)
}
}

Expand Down

0 comments on commit 90beb60

Please sign in to comment.