Skip to content

Commit

Permalink
(fix) tf plan, display error from result stream
Browse files Browse the repository at this point in the history
  • Loading branch information
tphoney committed Oct 2, 2024
1 parent 989d410 commit aa1fea9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions cmd/explore.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,7 @@ func Explore(cmd *cobra.Command, args []string) error {
defer cleanup()

exploreURL := fmt.Sprintf("%v/explore", oi.FrontendUrl)
err = browser.OpenURL(exploreURL)
if err != nil {
pterm.Error.Printf("Unable to open browser: %v", err)
}
_ = browser.OpenURL(exploreURL) // ignore error, we can't do anything about it

pterm.Println()
pterm.Println(fmt.Sprintf("Explore your infrastructure graph at %s", exploreURL))
Expand Down
2 changes: 1 addition & 1 deletion cmd/terraform_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func TerraformPlanImpl(ctx context.Context, cmd *cobra.Command, oi sdp.OvermindI
blastRadiusSpinner.UpdateText(fmt.Sprintf("Calculating Blast Radius: %v", snapshotDetail(stateLabel, blastRadiusItems, blastRadiusEdges)))
}
if resultStream.Err() != nil {
blastRadiusSpinner.Fail(fmt.Sprintf("Calculating Blast Radius: error streaming results: %v", err))
blastRadiusSpinner.Fail(fmt.Sprintf("Calculating Blast Radius: error streaming results: %v", resultStream.Err()))
return nil
}
blastRadiusSpinner.Success("Calculating Blast Radius: done")
Expand Down

0 comments on commit aa1fea9

Please sign in to comment.