Skip to content

Commit d33f013

Browse files
committed
cluster-api: change temporary directory path
Changes the temporary directory where clusterapi dependencies are unpacked from <clusterdir>/bin/cluster-api to <clusterdir>/cluster-api The clusterapi teardown function only removes the cluster-api dir, so we are leaking the bin dir. There are other ways we could resolve this issue, but ultimately we don't need to create a nested temporary directory.
1 parent 1e4cb53 commit d33f013

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/clusterapi/localcontrolplane.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ type localControlPlane struct {
6060
// Run launches the local control plane.
6161
func (c *localControlPlane) Run(ctx context.Context) error {
6262
// Create a temporary directory to unpack the cluster-api binaries.
63-
c.BinDir = filepath.Join(command.RootOpts.Dir, "bin", "cluster-api")
63+
c.BinDir = filepath.Join(command.RootOpts.Dir, "cluster-api")
6464
if err := UnpackClusterAPIBinary(c.BinDir); err != nil {
6565
return fmt.Errorf("failed to unpack cluster-api binary: %w", err)
6666
}

0 commit comments

Comments
 (0)