diff --git a/scripts/migrations b/scripts/migrations index 292965fc..1b6d8fbc 100755 --- a/scripts/migrations +++ b/scripts/migrations @@ -54,11 +54,10 @@ function init() { # function updateRepoURL() { - local URL="$(curl --max-time 10 -Ls -o /dev/null -w %{url_effective} https://cathook.club/s/ch/git || echo error)" + local URL="$(curl --max-time 10 -s -o /dev/null -w %{redirect_url} https://cathook.club/s/ch/git || echo error)" local GIT_REMOTE=$(git config --get remote.origin.url || echo unknown) if [ "$URL" != "error" ] && [ "$GIT_REMOTE" != "$URL" ]; then - git remote set-url origin "$URL" - echo -e "\033[1;33m\n\nMigrations: Updated remote URL to new repo! Welcome to $URL!\n\n\033[0m" + git remote set-url origin "$URL" && echo -e "\033[1;33m\n\nMigrations: Updated remote URL to new repo! Welcome to $URL!\n\n\033[0m" || : fi }