From 458cd8d28595ccbedba2f97e8c4fbef78f43a45e Mon Sep 17 00:00:00 2001 From: Dan Kortschak Date: Mon, 22 Sep 2025 07:10:34 +0930 Subject: [PATCH] internal/stack: use options.Printer.Printf instead of fmt.Printf --- internal/stack/boot.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/stack/boot.go b/internal/stack/boot.go index 0997a735f2..d076bce74d 100644 --- a/internal/stack/boot.go +++ b/internal/stack/boot.go @@ -61,7 +61,7 @@ func BootUp(ctx context.Context, options Options) error { } if found { - fmt.Printf("Custom build packages directory found: %s\n", buildPackagesPath) + options.Printer.Printf("Custom build packages directory found: %s\n", buildPackagesPath) err = copyUniquePackages(buildPackagesPath, stackPackagesDir.PackagesDir()) if err != nil { return fmt.Errorf("copying package contents failed: %w", err) @@ -95,7 +95,7 @@ func BootUp(ctx context.Context, options Options) error { // elastic-agent failed. if onlyElasticAgentFailed(ctx, options) && !errors.Is(err, context.Canceled) { sleepTime := 2 * time.Second - fmt.Printf("Elastic Agent failed to start, trying again in %s.\n", sleepTime) + options.Printer.Printf("Elastic Agent failed to start, trying again in %s.\n", sleepTime) select { case <-time.After(sleepTime): err = dockerComposeUp(ctx, options)