diff options
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 |