1
0
Fork 1
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:
Roman Volosatovs 2022-01-24 12:07:15 +01:00
parent 61f4f686c5
commit a39a11681a
No known key found for this signature in database
GPG key ID: 216DD5F8CA6618A1

View file

@ -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)' \