From 4a69352213d02ffa80ccbd135a87d38c12d79b4b Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Mon, 21 Oct 2024 10:02:53 -0400 Subject: [PATCH] Try to push to the fork only when working on the work-tree MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should avoid pushing to the fork on the π or on android --- tools/upgrade.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 5acf232d3..a26a41794 100755 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -253,7 +253,9 @@ if LANG= git pull --quiet --rebase $remote $branch; then git config oh-my-zsh.lastVersion "$last_commit" # Push to fork - git push --force origin $branch + if [[ $remote == upstream ]]; then + git push --force origin $branch + fi # Print changelog to the terminal if [[ $interactive == true && $verbose_mode == default ]]; then