mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-11 00:10:08 +00:00
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
This commit is contained in:
parent
e3131d98aa
commit
5c1a5c6ce9
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue