refactor: simplify code
parent
3c2694a897
commit
b8ff26a44d
|
@ -227,9 +227,6 @@ func scanRun(opts *pkg.ScanOptions) error {
|
|||
}()
|
||||
|
||||
analysis, err := ctl.Run()
|
||||
if !opts.DisableTelemetry {
|
||||
telemetry.SendTelemetry(store)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -242,6 +239,10 @@ func scanRun(opts *pkg.ScanOptions) error {
|
|||
globaloutput.Printf(color.WhiteString("Scan duration: %s\n", analysis.Duration.Round(time.Second)))
|
||||
globaloutput.Printf(color.WhiteString("Provider version used to scan: %s. Use --tf-provider-version to use another version.\n"), resourceSchemaRepository.ProviderVersion.String())
|
||||
|
||||
if !opts.DisableTelemetry {
|
||||
telemetry.SendTelemetry(store)
|
||||
}
|
||||
|
||||
if !analysis.IsSync() {
|
||||
globaloutput.Printf("\nHint: use gen-driftignore command to generate a .driftignore file based on your drifts\n")
|
||||
|
||||
|
|
Loading…
Reference in New Issue