fe0dd8226d6f58ea98f9f84b279e6c3859993fb9
- Author
- Carlo Sala <carlosalag@protonmail.com>
- Committer
- Carlo Sala <carlosalag@protonmail.com>
- Date
Message
fix(upgrade): do not upgrade if not called from tty
Fixes #11390
Diff
1diff --git a/.prettierrc b/.prettierrc
2new file mode 100644
3index 0000000000000000000000000000000000000000..a8f5a14b05eadf6f171831bed38bdaf41e5f3f99
4--- /dev/null
5+++ b/.prettierrc
6@@ -0,0 +1,4 @@
7+{
8+ "printWidth": 110,
9+ "proseWrap": "always"
10+}
11diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
12index 3a6bb65555cbf41d5eb6eb35b2ccc88242d8b48e..734714c94ca0ebdc0ce76ae3f8b7f992f782eb0e 100644
13--- a/tools/check_for_upgrade.sh
14+++ b/tools/check_for_upgrade.sh
15@@ -21,9 +21,11 @@ zstyle -s ':omz:update' mode update_mode || {
16 # Cancel update if:
17 # - the automatic update is disabled.
18 # - the current user doesn't have write permissions nor owns the $ZSH directory.
19+# - is not run from a tty
20 # - git is unavailable on the system.
21 if [[ "$update_mode" = disabled ]] \
22 || [[ ! -w "$ZSH" || ! -O "$ZSH" ]] \
23+ || [[ ! -t 1 ]] \
24 || ! command git --version 2>&1 >/dev/null; then
25 unset update_mode
26 return