mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2025-11-04 13:21:19 +08:00 
			
		
		
		
	Merge pull request #2358 from n-st/master
Cancel update if the current user doesn't have write permissions for the oh-my-zsh directory.
This commit is contained in:
		
						commit
						c9e5adb637
					
				@ -26,6 +26,13 @@ if [ -f ~/.zsh-update ]
 | 
			
		||||
then
 | 
			
		||||
  . ~/.zsh-update
 | 
			
		||||
 | 
			
		||||
  # cancel update if the current user doesn't have write permissions for the
 | 
			
		||||
  # oh-my-zsh directory
 | 
			
		||||
  if [ -n $(find -not -writable "$ZSH") ]
 | 
			
		||||
  then
 | 
			
		||||
    return 0;
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if [[ -z "$LAST_EPOCH" ]]; then
 | 
			
		||||
    _update_zsh_update && return 0;
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user