3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2024-12-17 13:47:20 +00:00

Resolved bug with already existing remote (#228)

This commit is contained in:
Tonye Jack 2021-10-26 09:39:24 -04:00 committed by GitHub
parent 5de15f855c
commit 3b3a421bef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,11 @@ fi
SERVER_URL=$(echo "$GITHUB_SERVER_URL" | awk -F/ '{print $3}')
git remote add temp_changed_files "https://${INPUT_TOKEN}@${SERVER_URL}/${GITHUB_REPOSITORY}"
git ls-remote temp_changed_files 1>/dev/null 2>&1 && exit_status=$? || exit_status=$?
if [[ $exit_status -ne 0 ]]; then
git remote add temp_changed_files "https://${INPUT_TOKEN}@${SERVER_URL}/${GITHUB_REPOSITORY}"
fi
echo "Getting HEAD info..."