From d5a2fbcf8da108a88f9c468baeb2a9a784bae87a Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Mon, 24 Jan 2022 12:09:51 +0100 Subject: [PATCH] tree-sitter: allow token-less execution --- pkgs/development/tools/parsing/tree-sitter/update.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index 3bce9868912b..815a1dcbb064 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -366,7 +366,7 @@ let set -euo pipefail args=( '--silent' ) - if [ -n "$GITHUB_TOKEN" ]; then + if [ -n "''${GITHUB_TOKEN:-}" ]; then args+=( "-H" "Authorization: token ''${GITHUB_TOKEN}" ) fi args+=( "https://api.github.com/repos/${urlEscape orga}/${urlEscape repo}/releases/latest" ) @@ -390,7 +390,7 @@ let set -euo pipefail args=( '--silent' ) - if [ -n "$GITHUB_TOKEN" ]; then + if [ -n "''${GITHUB_TOKEN:-}" ]; then args+=( "-H" "Authorization: token ''${GITHUB_TOKEN}" ) fi args+=( 'https://api.github.com/orgs/${urlEscape orga}/repos?per_page=100' )