Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more fixes
  • Loading branch information
mtojek committed Sep 7, 2023
commit cd0c134ce1ed65ada0aa74e5eaa75dabf2746e1f
10 changes: 4 additions & 6 deletions provisioner/terraform/provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ import (
"strings"
"time"

"cdr.dev/slog"
"github.com/djherbis/times"
"golang.org/x/xerrors"

"cdr.dev/slog"

"github.com/coder/coder/v2/coderd/tracing"
"github.com/coder/coder/v2/provisionersdk"
"github.com/coder/coder/v2/provisionersdk/proto"
Expand Down Expand Up @@ -276,10 +277,7 @@ func cleanStaleTerraformPlugins(ctx context.Context, cachePath string, now time.
}

parts := strings.Split(relativePath, string(filepath.Separator))
if len(parts) >= 5 {
return false
}
return true
return len(parts) == 5
}

// Review cached Terraform plugins
Expand All @@ -293,7 +291,7 @@ func cleanStaleTerraformPlugins(ctx context.Context, cachePath string, now time.
return nil
}

logger.Debug(ctx, "Plugin directory discovered: %s", path)
logger.Debug(ctx, "plugin directory discovered: %s", path)
pluginPaths = append(pluginPaths, path)
return nil
})
Expand Down