Skip to content
Snippets Groups Projects
Commit df557de2 authored by Grégoire Kubler's avatar Grégoire Kubler
Browse files

fix : handled case where dep id cannot be retrieved properly

parent d7c51b54
No related branches found
No related tags found
No related merge requests found
...@@ -41,6 +41,11 @@ ...@@ -41,6 +41,11 @@
PROJ=$(curl -s "$API_URL/users/$USER_ID/projects?search=${DEP_NAME}") PROJ=$(curl -s "$API_URL/users/$USER_ID/projects?search=${DEP_NAME}")
DEP_ID=$(jq -r '.[0].id' <<<$PROJ) DEP_ID=$(jq -r '.[0].id' <<<$PROJ)
fi fi
if [[ "$DEP_ID" == "null" ]]; then
echo "$DEP_NAME not found within $API_URL/users/$USER_ID/projects."
echo "Please make sure there is no typo in the writing and, if you are using a fork, make sure you have forked $DEP_NAME."
exit 1
fi
###################################################################################################### ######################################################################################################
# Retrieve the branch to pull # Retrieve the branch to pull
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment