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

feat: more friendly cli error message #1391

Merged
merged 1 commit into from
Mar 1, 2023

Conversation

lobshunter
Copy link
Contributor

@lobshunter lobshunter commented Feb 28, 2023

This PR closes #1211, show more user friendly error message on argument error. The output is similar to nerdctl and docker cli.

It looks like below:
Screenshot 2023-02-28 at 19 01 06

@lobshunter lobshunter marked this pull request as ready for review February 28, 2023 12:23
@AkihiroSuda AkihiroSuda added this to the v0.16.0 milestone Feb 28, 2023
@AkihiroSuda AkihiroSuda added the area/cli limactl CLI user experience label Feb 28, 2023
@@ -119,3 +119,18 @@ func handleExitCoder(err error) {
return
}
}

func WrapArgsError(argFn cobra.PositionalArgs) cobra.PositionalArgs {
Copy link
Member

Choose a reason for hiding this comment

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

Please consider adding a comment line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for quick review, updated in 48ae695.

AkihiroSuda
AkihiroSuda previously approved these changes Feb 28, 2023
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

Signed-off-by: pengyu <pengyu@pingcap.com>
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit 8e8c60d into lima-vm:master Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli limactl CLI user experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

limactl validate should provide help
2 participants