terraform: shadow graph uses GraphWalkerPanicwrap to catch errors
This commit is contained in:
parent
da508d6a8b
commit
90bfff3026
|
@ -736,11 +736,14 @@ func (c *Context) walk(
|
||||||
|
|
||||||
// If we have a shadow graph, wait for that to complete.
|
// If we have a shadow graph, wait for that to complete.
|
||||||
if shadowCloser != nil {
|
if shadowCloser != nil {
|
||||||
// Build the graph walker for the shadow.
|
// Build the graph walker for the shadow. We also wrap this in
|
||||||
shadowWalker := &ContextGraphWalker{
|
// a panicwrap so that panics are captured. For the shadow graph,
|
||||||
|
// we just want panics to be normal errors rather than to crash
|
||||||
|
// Terraform.
|
||||||
|
shadowWalker := GraphWalkerPanicwrap(&ContextGraphWalker{
|
||||||
Context: shadowCtx,
|
Context: shadowCtx,
|
||||||
Operation: operation,
|
Operation: operation,
|
||||||
}
|
})
|
||||||
|
|
||||||
// Kick off the shadow walk. This will block on any operations
|
// Kick off the shadow walk. This will block on any operations
|
||||||
// on the real walk so it is fine to start first.
|
// on the real walk so it is fine to start first.
|
||||||
|
|
Loading…
Reference in New Issue