fix write_config to properly error for mismatched config files
This commit is contained in:
		
							parent
							
								
									71d4f2c4be
								
							
						
					
					
						commit
						a1469f1185
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		
							
								
								
									
										2
									
								
								setup.sh
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								setup.sh
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -107,7 +107,7 @@ function write_config()
 | 
			
		|||
    env "${new_vars[@]}" envsubst "$vars" < "$src" > "$temp" || { rm -f "$temp"; exit 1; }
 | 
			
		||||
    chmod "$mode" "$temp" || { rm -f "$temp"; exit 1; }
 | 
			
		||||
    chown "$owner" "$temp" || { rm -f "$temp"; exit 1; }
 | 
			
		||||
    if mv -n -T "$temp" "$dest"; then
 | 
			
		||||
    if [[ ! -f "$dest" ]] && mv -v -T "$temp" "$dest"; then
 | 
			
		||||
        return 0
 | 
			
		||||
    fi
 | 
			
		||||
    if diff -u --label="expanded $src" "$temp" "$dest"; then
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue