Skip to content

Commit

Permalink
fix(upgrade): do not upgrade if not called from tty
Browse files Browse the repository at this point in the history
Fixes #11390
  • Loading branch information
carlosala committed Jan 17, 2023
1 parent 5b9de6a commit fe0dd82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"printWidth": 110,
"proseWrap": "always"
}
2 changes: 2 additions & 0 deletions tools/check_for_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ zstyle -s ':omz:update' mode update_mode || {
# Cancel update if:
# - the automatic update is disabled.
# - the current user doesn't have write permissions nor owns the $ZSH directory.
# - is not run from a tty
# - git is unavailable on the system.
if [[ "$update_mode" = disabled ]] \
|| [[ ! -w "$ZSH" || ! -O "$ZSH" ]] \
|| [[ ! -t 1 ]] \
|| ! command git --version 2>&1 >/dev/null; then
unset update_mode
return
Expand Down

0 comments on commit fe0dd82

Please sign in to comment.