Commit 73de6f40 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #30685 from gmarek/leak

Automatic merge from submit-queue Fix resource leak check in case of run that cleans up after failed one @fejta Broken by #28575
parents 5c1d7a7d 5e421cc4
...@@ -233,10 +233,11 @@ func DiffResources(before, clusterUp, after, location string) { ...@@ -233,10 +233,11 @@ func DiffResources(before, clusterUp, after, location string) {
if len(lines) < 3 { // Ignore the +++ and --- header lines if len(lines) < 3 { // Ignore the +++ and --- header lines
return return
} }
lines = lines[2:]
var added []string var added []string
for _, l := range lines { for _, l := range lines {
if strings.HasPrefix(l, "+") { if strings.HasPrefix(l, "+") && len(strings.TrimPrefix(l, "+")) > 0 {
added = append(added, l) added = append(added, l)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment