plural-cli icon indicating copy to clipboard operation
plural-cli copied to clipboard

Update module github.com/urfave/cli to v2

Open plural-bot opened this issue 3 years ago • 4 comments

This PR contains the following updates:

Package Type Update Change
github.com/urfave/cli require major v1.22.10 -> v2.23.4

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • [ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

plural-bot avatar Aug 02 '22 09:08 plural-bot

Autoclosing Skipped

This PR has been flagged for autoclosing, however it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error.

plural-bot avatar Oct 25 '22 08:10 plural-bot

@zreigz we should probably rebase this and try and get it merged.

davidspek avatar Nov 09 '22 14:11 davidspek

Yes I will add this to the linear

zreigz avatar Nov 09 '22 15:11 zreigz

@DavidSpek there is a problem with the cli.Context.

func requireArgs(fn func(*cli.Context) error, args []string) func(*cli.Context) error {
	return func(c *cli.Context) error {
		nargs := c.NArg()

The method c.NArg() returns the number of arguments and flags. The method c.FlagNames() always returns a nil object so we can't distinguish between flags and arguments. It causes problems with command: plural vpn create-client test-client --server wireguard2

In v1 nargs = 1 but in v2 nargs = 3 so requireArgs will fail with error Too many args passed ...

zreigz avatar Nov 16 '22 11:11 zreigz