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
Invalid goarch values are ignored #1878
Comments
can I give it a try? |
Go ahead @yzwdroid 🙏 |
Hi @caarlos0, I am new to golang and cobra, can you give me some hint which file should I code to validate the goarch. check.go or somewhere else. Also I found the code in check.go cfg, err := loadConfig(root.config) if err := ctrlc.Default.Run(ctx, func() error {
log.Info(color.New(color.Bold).Sprint("checking config:"))
return defaults.Pipe{}.Run(ctx)
}); err != nil {
log.WithError(err).Error(color.New(color.Bold).Sprintf("config is invalid"))
return fmt.Errorf("invalid config: %w", err)
} where could be the right place to do the validation. Thanks caarlos0 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Describe the bug
If you write a wrong
goarch:
field, it's simply ignored and no errors printed.For example, I have
goarch: [i386, amd64]
and onlyamd64
gets built –no errors are shown about i386 being a wrong GOARCH valueTo Reproduce
Steps to reproduce the behavior:
It's valid
Expected behavior
Expected to see an error.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: