mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2024-05-11 05:55:17 +00:00 
			
		
		
		
	fix(CLI): properly get zsh command in omz update (#9558)
				
					
				
			Zsh versions older than 5.3 don't have ZSH_ARGZERO, so use an alternative method to get the zsh command. Fixes #9558
This commit is contained in:
		@@ -391,7 +391,9 @@ function _omz::update {
 | 
			
		||||
 | 
			
		||||
  # Restart the zsh session
 | 
			
		||||
  if [[ $ret -eq 0 && "$1" != --unattended ]]; then
 | 
			
		||||
    # Old zsh versions don't have ZSH_ARGZERO
 | 
			
		||||
    local zsh="${ZSH_ARGZERO:-${functrace[-1]%:*}}"
 | 
			
		||||
    # Check whether to run a login shell
 | 
			
		||||
    [[ "$ZSH_ARGZERO" = -* ]] && exec -l "${ZSH_ARGZERO#-}" || exec "$ZSH_ARGZERO"
 | 
			
		||||
    [[ "$zsh" = -* || -o login ]] && exec -l "${zsh#-}" || exec "$zsh"
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user