Skip to content

Commit

Permalink
sweep fix redux
Browse files Browse the repository at this point in the history
  • Loading branch information
DrFaust92 committed Jan 5, 2022
1 parent 1900ba6 commit 5682817
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/service/cloud9/sweep.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func sweepEnvironmentEC2s(region string) error {
if err != nil {
return fmt.Errorf("error getting client: %w", err)
}
conn := client.(*AWSClient).cloud9conn
conn := client.(*conns.AWSClient).Cloud9Conn
sweepResources := make([]*sweep.SweepResource, 0)
var sweeperErrs *multierror.Error

Expand Down Expand Up @@ -60,11 +60,11 @@ func sweepEnvironmentEC2s(region string) error {
}

if err = sweep.SweepOrchestrator(sweepResources); err != nil {
errs = multierror.Append(errs, fmt.Errorf("error sweeping Cloud9 Environment EC2 for %s: %w", region, err))
sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error sweeping Cloud9 Environment EC2 for %s: %w", region, err))
}

if sweep.SkipSweepError(errs.ErrorOrNil()) {
log.Printf("[WARN] Skipping Cloud9 Environment EC2s for %s: %s", region, errs)
if sweep.SkipSweepError(sweeperErrs.ErrorOrNil()) {
log.Printf("[WARN] Skipping Cloud9 Environment EC2s for %s: %s", region, sweeperErrs)
return nil
}

Expand Down

0 comments on commit 5682817

Please sign in to comment.