Skip to content

Commit

Permalink
command/apply: add additional nil check to loading state for outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Nov 3, 2016
1 parent 83e3fa2 commit 6c801d0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion command/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,12 @@ func outputsAsString(state *terraform.State, modPath []string, schema []*config.
return ""
}

outputs := state.ModuleByPath(modPath).Outputs
ms := state.ModuleByPath(modPath)
if ms == nil {
return ""
}

outputs := ms.Outputs
outputBuf := new(bytes.Buffer)
if len(outputs) > 0 {
schemaMap := make(map[string]*config.Output)
Expand Down

0 comments on commit 6c801d0

Please sign in to comment.