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 {
|
if op.PlanRefresh {
|
||||||
log.Printf("[INFO] backend/local: plan calling Refresh")
|
log.Printf("[INFO] backend/local: plan calling Refresh")
|
||||||
|
|
||||||
|
if b.CLI != nil {
|
||||||
b.CLI.Output(b.Colorize().Color(strings.TrimSpace(planRefreshing) + "\n"))
|
b.CLI.Output(b.Colorize().Color(strings.TrimSpace(planRefreshing) + "\n"))
|
||||||
|
}
|
||||||
|
|
||||||
_, err := tfCtx.Refresh()
|
_, err := tfCtx.Refresh()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
runningOp.Err = errwrap.Wrapf("Error refreshing state: {{err}}", err)
|
runningOp.Err = errwrap.Wrapf("Error refreshing state: {{err}}", err)
|
||||||
|
|
Loading…
Reference in New Issue