Skip to content

Commit

Permalink
Merge pull request #5552 from mailcow/staging
Browse files Browse the repository at this point in the history
[Update.sh] Fix repo change when running in forced mode
  • Loading branch information
DerLinkman authored Nov 21, 2023
2 parents a80b5b7 + 5a10f2d commit 979f547
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -891,9 +891,14 @@ if [ "$CURRENT_REPO" != "$DEFAULT_REPO" ]; then
echo "The Repository currently used is not the default Mailcow Repository."
echo "Currently Repository: $CURRENT_REPO"
echo "Default Repository: $DEFAULT_REPO"
read -r -p "Should it be changed back to default? [y/N] " repo_response
if [[ "$repo_response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
git remote set-url origin $DEFAULT_REPO
if [ ! $FORCE ]; then
read -r -p "Should it be changed back to default? [y/N] " repo_response
if [[ "$repo_response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
git remote set-url origin $DEFAULT_REPO
fi
else
echo "Running in forced mode... setting Repo to default!"
git remote set-url origin $DEFAULT_REPO
fi
fi

Expand Down

0 comments on commit 979f547

Please sign in to comment.