From bd182b4306fb4b1f3fe0b56e114f5f442950ef80 Mon Sep 17 00:00:00 2001 From: Philip Laine Date: Tue, 6 Aug 2024 18:20:37 +0200 Subject: [PATCH] refactor: replace debug logs with returning errors (#2777) Signed-off-by: Philip Laine --- src/cmd/connect.go | 2 +- src/pkg/packager/deploy.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/connect.go b/src/cmd/connect.go index adb9b45df3..8600d703a3 100644 --- a/src/cmd/connect.go +++ b/src/cmd/connect.go @@ -70,7 +70,7 @@ var connectCmd = &cobra.Command{ spinner.Updatef(lang.CmdConnectEstablishedWeb, tunnel.FullURL()) if err := exec.LaunchURL(tunnel.FullURL()); err != nil { - message.Debug(err) + return err } } diff --git a/src/pkg/packager/deploy.go b/src/pkg/packager/deploy.go index 02519e7848..a633e84ab4 100644 --- a/src/pkg/packager/deploy.go +++ b/src/pkg/packager/deploy.go @@ -408,7 +408,7 @@ func (p *Packager) processComponentFiles(component types.ZarfComponent, pkgLocat // Check if the file looks like a text file isText, err := helpers.IsTextFile(subFile) if err != nil { - message.Debugf("unable to determine if file %s is a text file: %s", subFile, err) + return err } // If the file is a text file, template it