From 53a8d913bbee6f6413627426ef5ecfa15a09513c Mon Sep 17 00:00:00 2001 From: Philip Laine Date: Tue, 6 Aug 2024 12:18:17 +0200 Subject: [PATCH] refactor: replace debug logs with returning errors 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 26f012660e..4258279ebf 100644 --- a/src/cmd/connect.go +++ b/src/cmd/connect.go @@ -65,7 +65,7 @@ var connectCmd = &cobra.Command{ } else { 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 612fa5eb10..257a7608b8 100644 --- a/src/pkg/packager/deploy.go +++ b/src/pkg/packager/deploy.go @@ -407,7 +407,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