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

Update module github.com/urfave/cli to v2 #140

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

plural-bot
Copy link
Contributor

@plural-bot plural-bot commented Aug 2, 2022

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.

@davidspek davidspek added the breaking-change This pull request may break an installation on update label Aug 2, 2022
@plural-bot
Copy link
Contributor Author

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.

@davidspek
Copy link
Contributor

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

@zreigz
Copy link
Member

zreigz commented Nov 9, 2022

Yes I will add this to the linear

@zreigz zreigz force-pushed the renovate/github.com-urfave-cli-2.x branch from 5f55ff3 to 0865622 Compare November 16, 2022 10:43
@zreigz zreigz self-requested a review as a code owner November 16, 2022 10:43
@zreigz
Copy link
Member

zreigz commented Nov 16, 2022

@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 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change This pull request may break an installation on update dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants