urfave / cli

A simple, fast, and fun package for building command line apps in Go
https://cli.urfave.org
MIT License
21.9k stars 1.69k forks source link

Fix repeated [arguments...] in usage template in v2 #1872

Closed edeustua closed 3 months ago

edeustua commented 4 months ago

What type of PR is this?

What this PR does / why we need it:

This PR fixes a small bug in the usageTemplate template, where [arguments ...] would be printed even if command.Args == false and would be printed twice otherwise.

Which issue(s) this PR fixes:

None yet. I can create one.

Special notes for your reviewer:

Very simple thing. No need for much.

Testing

Visually. It is only a rendering issue.

Release Notes`

Fixes a repeating [arguments...] string in the usageTemplate
edeustua commented 4 months ago

I think this has been addressed in commit bda5fdd on the main branch already.

This is true. However, it hasn't been fixed in v2. That's why this PR is targeting v2-maint branch.

dearchap commented 3 months ago

@edeustua Can you fix the failing tests ?

edeustua commented 3 months ago

Sure. I'll push tonight.

edeustua commented 3 months ago

So one needs to add .local/bin to the PATH. That would be a nice thing to add to CONTRIBUTING.md along with the actual requirements, i.e. gfmrun and goimports.

dearchap commented 3 months ago

So one needs to add .local/bin to the PATH. That would be a nice thing to add to CONTRIBUTING.md along with the actual requirements, i.e. gfmrun and goimports.

Actually a simple make would have sufficed. It does all the heavy lifting for you.

edeustua commented 3 months ago

So one needs to add .local/bin to the PATH. That would be a nice thing to add to CONTRIBUTING.md along with the actual requirements, i.e. gfmrun and goimports.

Actually a simple make would have sufficed. It does all the heavy lifting for you.

That actually didn't work for me. Should I investigate further?