diff options
author | Marc Cornellà <marc.cornella@live.com> | 2020-12-07 19:53:07 +0100 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2020-12-07 20:58:12 +0100 |
commit | 5a888ff4ac58798ccdff0f32c4609fd153edc217 (patch) | |
tree | ae58ed17ad1de0cd9ccccf32fec1edfbe63ecae6 /tools/upgrade.sh | |
parent | fa1911f89eab6d8d753e302546c6ecd5d0db9e08 (diff) | |
download | zsh-5a888ff4ac58798ccdff0f32c4609fd153edc217.tar.gz zsh-5a888ff4ac58798ccdff0f32c4609fd153edc217.tar.bz2 zsh-5a888ff4ac58798ccdff0f32c4609fd153edc217.zip |
fix(updater): don't show changelog when running unattended update (#9495)
Fixes #9495
Diffstat (limited to 'tools/upgrade.sh')
-rwxr-xr-x | tools/upgrade.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 0e4c368bc..cfd424527 100755 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -70,10 +70,12 @@ if git pull --rebase --stat origin master; then message="Hooray! Oh My Zsh has been updated!" # Display changelog with less if available, otherwise just print it to the terminal - if (( $+commands[less] )); then - "$ZSH/tools/changelog.sh" HEAD "$last_commit" --text | command less -R - else - "$ZSH/tools/changelog.sh" HEAD "$last_commit" + if [[ "$1" = --interactive ]]; then + if (( $+commands[less] )); then + "$ZSH/tools/changelog.sh" HEAD "$last_commit" --text | LESS= command less -R + else + "$ZSH/tools/changelog.sh" HEAD "$last_commit" + fi fi fi |