Commit 3a68bd0d authored by Don's avatar Don

Fix error handling when github API is unavailable.

The `exit` (instead of `return`) caused the shell to quit if there was
an error with github.
parent 1c3618b1
......@@ -19,12 +19,12 @@ function omf.remote --argument-names options -d 'List remote plugins and themes'
if echo $page_count | grep -vE '^[0-9]+$'
echo "Could not access Github API" >&2
exit 1
return 1
end
set repos ""
for i in (seq $page_count)
set answer (curl -s "$url?page=$i&per_page=100" | grep \"name\" | tr \": " " | awk '{print $2}')
set answer (curl -s "$url?page=$i&per_page=100" | grep '"name"' | tr '":' " " | awk '{print $2}')
set repos "$answer $repos"
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment