Skip to content

Commit

Permalink
Do not exit 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Shamus03 committed Jun 6, 2023
1 parent 4093b8e commit a6a4d8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/opt/nasa-apod-background/nasa-apod-background.fish
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ set img_lock $config_dir/apod_lock.jpg

if not test -f $api_key_file
echo "Api key not found - please create a file $api_key_file containing your NASA API key"
exit 1
return
end
set api_key (cat $api_key_file)

set apod (curl --silent "https://api.nasa.gov/planetary/apod?api_key=$api_key" | jp @)
or begin
echo "APOD returned invalid json: $apod"
exit 1
return
end

set apod_url (echo $apod | jp -u url)
Expand Down

0 comments on commit a6a4d8d

Please sign in to comment.