Skip to content

Instantly share code, notes, and snippets.

@zzamboni
Created April 10, 2019 18:58
Show Gist options
  • Save zzamboni/930d41718f4fa31a6536f4da5f6c567c to your computer and use it in GitHub Desktop.
Save zzamboni/930d41718f4fa31a6536f4da5f6c567c to your computer and use it in GitHub Desktop.
diff --git a/update.elv b/update.elv
index 7bf4d15..b071890 100644
--- a/update.elv
+++ b/update.elv
@@ -73,7 +73,11 @@ fn check-commit [&commit=(current-commit-or-tag) &verbose=$false]{
compare = [(re:split "\r\n\r\n" $compare)]
headers = $compare[-2]
json = (echo $compare[-1] | from-json)
- if (and (has-key $json total_commits) (> $json[total_commits] 0)) {
+ total_commits = 0
+ if (and (has-key $json total_commits)) {
+ total_commits = $json[total_commits]
+ }
+ if (> $total_commits 0) {
echo (styled $update-message yellow)
if $verbose {
for commit $json[commits] {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment