Skip to content

Commit ece43c9

Browse files
committed
Fix: fetching of repo_topics now fails gracefully
1 parent eb3e1d3 commit ece43c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

actions_install.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ arduino-cli core update-index > /dev/null
3737
case "$GITHUB_REPOSITORY" in
3838
(*/ci-arduino|*/Adafruit_Learning_System_Guides) ;;
3939
(*)
40-
repo_topics=$($(curl --request GET --url "https://api.github.com/repos/$GITHUB_REPOSITORY" || []) | jq -r '.topics[]')
40+
repo_topics=$(curl -f --request GET --url "https://api.github.com/repos/$GITHUB_REPOSITORY" || echo '{"topics":[]}')
41+
repo_topics=$(echo $repo_topics | jq -r '.topics[]' )
4142
if [[ ! $repo_topics =~ "arduino-library" ]]; then
4243
echo "::warning::arduino-library is not found in this repo topics. Please add this tag in repo About"
4344
fi

0 commit comments

Comments
 (0)