X Tutup
Skip to content

Commit 4ef8a75

Browse files
authored
Handle runtime error on bad user input (cli#1652)
1 parent d544f7f commit 4ef8a75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/gh/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func main() {
9494

9595
authCheckEnabled := os.Getenv("GITHUB_TOKEN") == "" &&
9696
os.Getenv("GITHUB_ENTERPRISE_TOKEN") == "" &&
97-
cmdutil.IsAuthCheckEnabled(cmd)
97+
cmd != nil && cmdutil.IsAuthCheckEnabled(cmd)
9898
if authCheckEnabled {
9999
cfg, err := cmdFactory.Config()
100100
if err != nil {

0 commit comments

Comments
 (0)
X Tutup