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

Prevent an error from being thrown on go help #2701

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions buildtools/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,9 @@ func extractThreadsFlag(args []string) (cleanArgs []string, threadsCount int, er
}

func GoCmd(c *cli.Context) error {
if show, err := cliutils.ShowCmdHelpIfNeeded(c, c.Args()); show || err != nil {
return err
}
configFilePath, err := goCmdVerification(c)
if err != nil {
return err
Expand All @@ -664,6 +667,9 @@ func GoCmd(c *cli.Context) error {
}

func GoPublishCmd(c *cli.Context) (err error) {
if show, err := cliutils.ShowCmdHelpIfNeeded(c, c.Args()); show || err != nil {
return err
}
configFilePath, err := goCmdVerification(c)
if err != nil {
return err
Expand All @@ -684,9 +690,6 @@ func GoPublishCmd(c *cli.Context) (err error) {
}

func goCmdVerification(c *cli.Context) (string, error) {
if show, err := cliutils.ShowCmdHelpIfNeeded(c, c.Args()); show || err != nil {
return "", err
}
if c.NArg() < 1 {
return "", cliutils.WrongNumberOfArgumentsHandler(c)
}
Expand Down
Loading