From 009b293c294f3c8c7bbbb80b3676a9acf1eac06e Mon Sep 17 00:00:00 2001 From: tyeth Date: Mon, 26 Feb 2024 15:26:07 +0000 Subject: [PATCH] Fix: fetching of repo_topics now fails gracefully --- actions_install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/actions_install.sh b/actions_install.sh index bdd1a96..b375fe2 100755 --- a/actions_install.sh +++ b/actions_install.sh @@ -37,7 +37,8 @@ arduino-cli core update-index > /dev/null case "$GITHUB_REPOSITORY" in (*/ci-arduino|*/Adafruit_Learning_System_Guides) ;; (*) - repo_topics=$($(curl --request GET --url "https://api.github.com/repos/$GITHUB_REPOSITORY" || []) | jq -r '.topics[]') + repo_topics=$(curl -f --request GET --url "https://api.github.com/repos/$GITHUB_REPOSITORY" || echo '{"topics":[]}') + repo_topics=$(echo $repo_topics | jq -r '.topics[]' ) if [[ ! $repo_topics =~ "arduino-library" ]]; then echo "::warning::arduino-library is not found in this repo topics. Please add this tag in repo About" fi