From 9622e13ba906764b11f98830d992f132bf15cfa6 Mon Sep 17 00:00:00 2001 From: Puskar Basu <45908484+pskrbasu@users.noreply.github.com> Date: Thu, 28 Oct 2021 14:23:48 +0530 Subject: [PATCH] `steampipe check --dry-run` should not display control summary. Closes #1053 --- control/controldisplay/table.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/control/controldisplay/table.go b/control/controldisplay/table.go index 7a053eba3d..ecae251db4 100644 --- a/control/controldisplay/table.go +++ b/control/controldisplay/table.go @@ -3,6 +3,8 @@ package controldisplay import ( "strings" + "github.com/spf13/viper" + "github.com/turbot/steampipe/constants" "github.com/turbot/steampipe/control/controlexecute" ) @@ -36,6 +38,10 @@ func (r TableRenderer) Render() string { } func (r TableRenderer) renderSummary() string { + // no need to render the summary when the dry-run flag is set + if viper.GetBool(constants.ArgDryRun) { + return "" + } return NewSummaryRenderer(r.resultTree, r.width).Render() }