Replace possible dead code with an assert
I believe because of the way we have structured the code, it is impossible to know a resource's parent but not printed it. I've changed the test which would print the parent resource to an assert that ensure we have printed it. The next commit is going to remove the shown array because we no longer need it, but this commit is here so that if there are display bugs as part of the larger refactoring in how we display events, we can bisect back and see this failure.
This commit is contained in:
parent
104cbd44ff
commit
138b2a4289
|
@ -245,10 +245,8 @@ func stepParentIndent(b *bytes.Buffer, step deploy.Step,
|
|||
// least, it would be ideal to preserve the indentation.
|
||||
break
|
||||
}
|
||||
if print && !shown[p] {
|
||||
// If the parent isn't yet shown, print it now as a summary.
|
||||
printStep(b, par, seen, shown, true, planning, indent, debug)
|
||||
}
|
||||
|
||||
contract.Assert(shown[p])
|
||||
indent++
|
||||
p = par.Res().Parent
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue