Handle runtime error on bad user input (#1652)

This commit is contained in:
Tony Rosler 2020-09-11 11:23:24 +02:00 committed by GitHub
parent d544f7f8da
commit 4ef8a75ae2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,7 +94,7 @@ func main() {
authCheckEnabled := os.Getenv("GITHUB_TOKEN") == "" &&
os.Getenv("GITHUB_ENTERPRISE_TOKEN") == "" &&
cmdutil.IsAuthCheckEnabled(cmd)
cmd != nil && cmdutil.IsAuthCheckEnabled(cmd)
if authCheckEnabled {
cfg, err := cmdFactory.Config()
if err != nil {