diff --git a/version/0.3.3/UPDATE.sh b/version/0.3.3/UPDATE.sh index 328961f8..5ece3eb3 100644 --- a/version/0.3.3/UPDATE.sh +++ b/version/0.3.3/UPDATE.sh @@ -151,7 +151,25 @@ print_space_and_line() { update_configuration_files() { echo "Updating configuration files in /etc/openpanel/" - cd /etc/openpanel && git pull + cd /etc/openpanel/ + + git stash # stash local conf + + # update from gh + if git pull origin main; then + echo "Successfully pulled the latest changes." + else + echo "There were merge conflicts." + if git ls-files -u | grep -q "^"; then + echo "Conflicted files:" + git ls-files -u + else + echo "No conflicts, but pull failed for another reason." + fi + fi + + git stash pop # restore local conf + }