Skip to content

Commit

Permalink
steampipe check all --dry-run displaying status summary of controls. c…
Browse files Browse the repository at this point in the history
…loses #1053
  • Loading branch information
pskrbasu committed Oct 26, 2021
1 parent dbd0418 commit e6db208
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion control/controldisplay/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package controldisplay
import (
"strings"

"github.com/spf13/viper"
"github.com/turbot/steampipe/constants"
"github.com/turbot/steampipe/control/controlexecute"
)

Expand Down Expand Up @@ -36,7 +38,12 @@ func (r TableRenderer) Render() string {
}

func (r TableRenderer) renderSummary() string {
return NewSummaryRenderer(r.resultTree, r.width).Render()
// no need to render the summary when the dry-run flag is set
if viper.GetBool(constants.ArgDryRun) {
return ""
} else {
return NewSummaryRenderer(r.resultTree, r.width).Render()
}
}

func (r TableRenderer) renderResult() string {
Expand Down

0 comments on commit e6db208

Please sign in to comment.