|
6 | 6 | "errors" |
7 | 7 | "fmt" |
8 | 8 | "io" |
9 | | - "time" |
10 | | - |
11 | 9 | "slices" |
| 10 | + "time" |
12 | 11 |
|
13 | 12 | "github.com/cloudquery/cloudquery/cli/internal/specs/v0" |
14 | 13 | "github.com/cloudquery/cloudquery/cli/internal/transformer" |
@@ -185,14 +184,18 @@ func syncConnectionV2(ctx context.Context, sourceClient *managedplugin.Client, d |
185 | 184 | return err |
186 | 185 | } |
187 | 186 | } |
188 | | - bar := progressbar.NewOptions(-1, |
189 | | - progressbar.OptionSetDescription("Syncing resources..."), |
190 | | - progressbar.OptionSetItsString("resources"), |
191 | | - progressbar.OptionShowIts(), |
192 | | - progressbar.OptionSetElapsedTime(true), |
193 | | - progressbar.OptionShowCount(), |
194 | | - progressbar.OptionClearOnFinish(), |
195 | | - ) |
| 187 | + |
| 188 | + bar := progressBar(noopProgressBar{}) |
| 189 | + if !logConsole { |
| 190 | + bar = progressbar.NewOptions(-1, |
| 191 | + progressbar.OptionSetDescription("Syncing resources..."), |
| 192 | + progressbar.OptionSetItsString("resources"), |
| 193 | + progressbar.OptionShowIts(), |
| 194 | + progressbar.OptionSetElapsedTime(true), |
| 195 | + progressbar.OptionShowCount(), |
| 196 | + progressbar.OptionClearOnFinish(), |
| 197 | + ) |
| 198 | + } |
196 | 199 |
|
197 | 200 | // Add a ticker to update the progress bar every second. |
198 | 201 | t := time.NewTicker(1 * time.Second) |
|
0 commit comments