Browse Source

fix(cli): exit `omz update` with correct error code (#10342)

Sina Tak Tehrani 2 years ago
parent
commit
1e5e834e0f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/cli.zsh

+ 2 - 2
lib/cli.zsh

@@ -755,9 +755,9 @@ function _omz::update {
 
   # Run update script
   if [[ "$1" != --unattended ]]; then
-    ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" --interactive
+    ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" --interactive || return $?
   else
-    ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh"
+    ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" || return $?
   fi
 
   # Update last updated file