backend/local: fix crash (in tests) due to not guarding nil CLI
This commit is contained in:
parent
d3633ab368
commit
31f7cca77f
|
@ -51,7 +51,10 @@ func (b *Local) opPlan(
|
|||
if op.PlanRefresh {
|
||||
log.Printf("[INFO] backend/local: plan calling Refresh")
|
||||
|
||||
b.CLI.Output(b.Colorize().Color(strings.TrimSpace(planRefreshing) + "\n"))
|
||||
if b.CLI != nil {
|
||||
b.CLI.Output(b.Colorize().Color(strings.TrimSpace(planRefreshing) + "\n"))
|
||||
}
|
||||
|
||||
_, err := tfCtx.Refresh()
|
||||
if err != nil {
|
||||
runningOp.Err = errwrap.Wrapf("Error refreshing state: {{err}}", err)
|
||||
|
|
Loading…
Reference in New Issue