summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorM. Yas. Davoodeh <30480116+MYDavoodeh@users.noreply.github.com>2020-07-13 14:22:28 +0430
committerGitHub <noreply@github.com>2020-07-13 11:52:28 +0200
commit5c1a5c6ce924755095020fd829b08f0ee205a723 (patch)
tree2cf01d0720d6529d08070dd623efd5ac2712a126 /tools
parente3131d98aa056145ed34ef19dfe77efff87be21b (diff)
downloadzsh-5c1a5c6ce924755095020fd829b08f0ee205a723.tar.gz
zsh-5c1a5c6ce924755095020fd829b08f0ee205a723.tar.bz2
zsh-5c1a5c6ce924755095020fd829b08f0ee205a723.zip
update: prefix rm call with command in trap (#9107)
* Suppress the problematic trap output in check_upg The newly added trap, in systems where `rm` is aliased to `rm="rm -v"`, shows a message stating that "update.lock" has been removed each time `zsh` is called. I simply suppressed it with directing the output to `/dev/null`. * Use `command` instead of >/dev/null to suppress
Diffstat (limited to 'tools')
-rw-r--r--tools/check_for_upgrade.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
index c91431c25..cadd5fe49 100644
--- a/tools/check_for_upgrade.sh
+++ b/tools/check_for_upgrade.sh
@@ -51,7 +51,7 @@ function update_ohmyzsh() {
# The return status from the function is handled specially. If it is zero, the signal is
# assumed to have been handled, and execution continues normally. Otherwise, the shell
# will behave as interrupted except that the return status of the trap is retained.
- trap "rm -rf '$ZSH/log/update.lock'; return 1" EXIT INT QUIT
+ trap "command rm -rf '$ZSH/log/update.lock'; return 1" EXIT INT QUIT
# Create or update .zsh-update file if missing or malformed
if ! source "${ZSH_CACHE_DIR}/.zsh-update" 2>/dev/null || [[ -z "$LAST_EPOCH" ]]; then