diff options
author | Marc Cornellà <hello@mcornella.com> | 2022-01-24 17:38:32 +0100 |
---|---|---|
committer | Marc Cornellà <hello@mcornella.com> | 2022-01-24 17:38:32 +0100 |
commit | f64cabc780496636b3e4f5283ef8d77c23f18e92 (patch) | |
tree | 0c84a04e9b9680d60512ee250dc30d4d55fc5acb /lib | |
parent | 8e7c33bf15ba2835da03604b396885ace635689c (diff) | |
download | zsh-f64cabc780496636b3e4f5283ef8d77c23f18e92.tar.gz zsh-f64cabc780496636b3e4f5283ef8d77c23f18e92.tar.bz2 zsh-f64cabc780496636b3e4f5283ef8d77c23f18e92.zip |
fix(cli): make sure to run `zsh` command if an alias exists (#9737)
Fixes #9737
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cli.zsh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/cli.zsh b/lib/cli.zsh index 2f3f293da..edc10e722 100644 --- a/lib/cli.zsh +++ b/lib/cli.zsh @@ -289,7 +289,7 @@ multi == 1 && length(\$0) > 0 { } # Exit if the new .zshrc file has syntax errors - if ! zsh -n "$zdot/.zshrc"; then + if ! command zsh -n "$zdot/.zshrc"; then _omz::log error "broken syntax in '"${zdot/#$HOME/\~}/.zshrc"'. Rolling back changes..." command mv -f "$zdot/.zshrc" "$zdot/.zshrc.new" command mv -f "$zdot/.zshrc.bck" "$zdot/.zshrc" @@ -365,7 +365,7 @@ multi == 1 && /^[^#]*\)/ { } # Exit if the new .zshrc file has syntax errors - if ! zsh -n "$zdot/.zshrc"; then + if ! command zsh -n "$zdot/.zshrc"; then _omz::log error "broken syntax in '"${zdot/#$HOME/\~}/.zshrc"'. Rolling back changes..." command mv -f "$zdot/.zshrc" "$zdot/.zshrc.new" command mv -f "$zdot/.zshrc.bck" "$zdot/.zshrc" @@ -721,7 +721,7 @@ EOF } # Exit if the new .zshrc file has syntax errors - if ! zsh -n "$zdot/.zshrc"; then + if ! command zsh -n "$zdot/.zshrc"; then _omz::log error "broken syntax in '"${zdot/#$HOME/\~}/.zshrc"'. Rolling back changes..." command mv -f "$zdot/.zshrc" "$zdot/.zshrc.new" command mv -f "$zdot/.zshrc.bck" "$zdot/.zshrc" @@ -765,9 +765,9 @@ function _omz::update { # Run update script if [[ "$1" != --unattended ]]; then - ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" --interactive || return $? + ZSH="$ZSH" command zsh -f "$ZSH/tools/upgrade.sh" --interactive || return $? else - ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" || return $? + ZSH="$ZSH" command zsh -f "$ZSH/tools/upgrade.sh" || return $? fi # Update last updated file |