mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-11 15:08:33 +01:00
tree-sitter: handle errors in update script
This commit is contained in:
parent
61f4f686c5
commit
a39a11681a
|
@ -398,7 +398,11 @@ let
|
|||
res=$(${curl}/bin/curl "''${args[@]}")
|
||||
|
||||
if [[ "$(printf "%s" "$res" | ${jq}/bin/jq '.message?')" =~ "rate limit" ]]; then
|
||||
echo "rate limited" >&2 #
|
||||
echo "rate limited" >&2
|
||||
exit 1
|
||||
elif [[ "$(printf "%s" "$res" | ${jq}/bin/jq '.message?')" =~ "Bad credentials" ]]; then
|
||||
echo "bad credentials" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf "%s" "$res" | ${jq}/bin/jq 'map(.name)' \
|
||||
|
|
Loading…
Reference in a new issue