File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -169,11 +169,12 @@ func (p *PlanParser) Parse(body string) ParseResult { //nolint:cyclop
169169	}
170170	var  hasPlanError  bool 
171171	switch  {
172- 	case  p .Pass .MatchString (firstMatchLine ):
173- 		result  =  lines [firstMatchLineIndex ]
174172	case  p .Fail .MatchString (firstMatchLine ):
173+ 		// Fail should be checked before Pass 
175174		hasPlanError  =  true 
176175		result  =  strings .Join (trimBars (trimLastNewline (lines [firstMatchLineIndex :])), "\n " )
176+ 	case  p .Pass .MatchString (firstMatchLine ):
177+ 		result  =  lines [firstMatchLineIndex ]
177178	}
178179
179180	hasDestroy  :=  p .HasDestroy .MatchString (firstMatchLine )
@@ -257,10 +258,11 @@ func (p *ApplyParser) Parse(body string) ParseResult {
257258		}
258259	}
259260	switch  {
260- 	case  p .Pass .MatchString (line ):
261- 		result  =  lines [i ]
262261	case  p .Fail .MatchString (line ):
262+ 		// Fail should be checked before Pass 
263263		result  =  strings .Join (trimBars (trimLastNewline (lines [i :])), "\n " )
264+ 	case  p .Pass .MatchString (line ):
265+ 		result  =  lines [i ]
264266	}
265267	return  ParseResult {
266268		Result : strings .TrimSpace (result ),
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments