Skip to content

Commit 4e51c1a

Browse files
authored
Merge pull request #248 from dmur1/improve-gist-errors
when the gist token has expired print a better warning saying so
2 parents c540202 + b0c46df commit 4e51c1a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

util/gist.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ func Gist(files map[string]interface{}) string {
4747
log.Fatalf("💥 "+theme.ColorRed+" error"+theme.ColorReset+": %v\n", err)
4848
}
4949

50+
html_url := result["html_url"]
51+
if html_url == nil {
52+
log.Fatalf("💥 "+theme.ColorRed+" error"+theme.ColorReset+": %v\n", result)
53+
}
54+
5055
url := result["html_url"].(string)
5156

5257
resp.Body.Close()

0 commit comments

Comments
 (0)