Skip to content

Commit

Permalink
Merge pull request #447 from hazelops/IZE-499-ize-status-doesnt-show-…
Browse files Browse the repository at this point in the history
…terraform-version-and-maybe-namespace-cant-reproduce

fixed show terraform version
  • Loading branch information
psihachina authored Sep 7, 2022
2 parents 8c20a48 + 760437d commit 4c6133c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion internal/commands/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,18 @@ func NewDebugCmd(project *config.Project) *cobra.Command {
{"PREFER_RUNTIME", project.PreferRuntime},
}).WithLeftAlignment().Render()

v := project.TerraformVersion
if project.Terraform != nil {
if i, ok := project.Terraform["infra"]; ok {
if len(i.Version) != 0 {
v = i.Version
}
}
}

pterm.DefaultSection.Println("Terraform Info")
_ = dt.WithData(pterm.TableData{
{"TERRAFORM_VERSION", project.TerraformVersion},
{"TERRAFORM_VERSION", v},
}).WithLeftAlignment().Render()

pterm.DefaultSection.Println("System Info")
Expand Down

0 comments on commit 4c6133c

Please sign in to comment.