diff --git a/command/apply.go b/command/apply.go index 1aef692e7..62daea217 100644 --- a/command/apply.go +++ b/command/apply.go @@ -160,7 +160,7 @@ func (c *ApplyCommand) Run(args []string) int { } // If we have outputs, then output those at the end. - if len(state.Outputs) > 0 { + if state != nil && len(state.Outputs) > 0 { outputBuf := new(bytes.Buffer) outputBuf.WriteString("[reset][bold][green]\nOutputs:\n\n")