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 | |
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')
-rw-r--r-- | tools/check_for_upgrade.sh | 2 | ||||
-rwxr-xr-x | tools/upgrade.sh | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 17925af8b..d0ceba92d 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -24,7 +24,7 @@ function update_last_updated_file() { } function update_ohmyzsh() { - ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" + ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" --interactive update_last_updated_file } 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 |