1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 15:47:14 +01:00

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.
This commit is contained in:
Patrick Dillon
2024-05-14 19:16:44 -04:00
parent 1e4cb53d79
commit d33f0130ff

View File

@@ -60,7 +60,7 @@ type localControlPlane struct {
// Run launches the local control plane.
func (c *localControlPlane) Run(ctx context.Context) error {
// Create a temporary directory to unpack the cluster-api binaries.
c.BinDir = filepath.Join(command.RootOpts.Dir, "bin", "cluster-api")
c.BinDir = filepath.Join(command.RootOpts.Dir, "cluster-api")
if err := UnpackClusterAPIBinary(c.BinDir); err != nil {
return fmt.Errorf("failed to unpack cluster-api binary: %w", err)
}