diff --git a/home/dot_local/bin/executable_full-upgrade.tmpl b/home/dot_local/bin/executable_full-upgrade.tmpl index d3d2b2f..3a5be38 100644 --- a/home/dot_local/bin/executable_full-upgrade.tmpl +++ b/home/dot_local/bin/executable_full-upgrade.tmpl @@ -33,8 +33,11 @@ if [[ "${CONTINUE_FROM_DOTFILES:-false}" == false ]]; then if chezmoi git -- status --porcelain | grep -q .; then log_manual_action "Skipping chezmoi update as uncommitted changes were found" - elif ! chezmoi git -- branch --show-current | grep -q .; then - log_manual_action "Skipping chezmoi update as the current branch could not be determined" + elif + # shellcheck disable=SC2312 + [[ "origin/$(chezmoi git -- rev-parse --abbrev-ref HEAD)" != "$(git rev-parse --abbrev-ref origin/HEAD)" ]] + then + log_manual_action "Skipping chezmoi update as the current branch is not the default branch" elif chezmoi git -- log '@{u}..' | grep -q .; then log_manual_action "Skipping chezmoi update as unpushed changes were found" else