mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2025-11-04 21:31:19 +08:00 
			
		
		
		
	fix(dotenv): actually exit when .env syntax is broken
This commit is contained in:
		
							parent
							
								
									ef3f7c43a9
								
							
						
					
					
						commit
						3427da4057
					
				@ -52,7 +52,10 @@ source_env() {
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # test .env syntax
 | 
			
		||||
  zsh -fn $ZSH_DOTENV_FILE || echo "dotenv: error when sourcing '$ZSH_DOTENV_FILE' file" >&2
 | 
			
		||||
  zsh -fn $ZSH_DOTENV_FILE || {
 | 
			
		||||
    echo "dotenv: error when sourcing '$ZSH_DOTENV_FILE' file" >&2
 | 
			
		||||
    return 1
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  setopt localoptions allexport
 | 
			
		||||
  source $ZSH_DOTENV_FILE
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user