From 484e362fcff09b8b74162eefd0c3bfd67e829d94 Mon Sep 17 00:00:00 2001 From: Florent Revest Date: Wed, 2 Oct 2024 16:02:12 +0200 Subject: pkg/build: use the build environment in clean() calls This unifies the build() and clean() interfaces such that if a custom compiler or make binary is provided in the manager or bisection config, they can be taken into account by the clean() interface. --- pkg/build/cuttlefish.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/build/cuttlefish.go') diff --git a/pkg/build/cuttlefish.go b/pkg/build/cuttlefish.go index bf345c2bc..18e1df178 100644 --- a/pkg/build/cuttlefish.go +++ b/pkg/build/cuttlefish.go @@ -165,9 +165,9 @@ func (c cuttlefish) build(params Params) (ImageDetails, error) { return details, nil } -func (c cuttlefish) clean(kernelDir, targetArch string) error { - if err := osutil.RemoveAll(filepath.Join(kernelDir, "out")); err != nil { +func (c cuttlefish) clean(params Params) error { + if err := osutil.RemoveAll(filepath.Join(params.KernelDir, "out")); err != nil { return err } - return osutil.RemoveAll(filepath.Join(kernelDir, "dist")) + return osutil.RemoveAll(filepath.Join(params.KernelDir, "dist")) } -- cgit mrf-deployment