From ee19c7a4fc726fd9712c7b2a2c8d5fed64351064 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Tue, 30 May 2023 13:01:52 -0700 Subject: [PATCH] fix nil error being returned --- agent/agent_windows.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/agent/agent_windows.go b/agent/agent_windows.go index 4383276..87c3667 100644 --- a/agent/agent_windows.go +++ b/agent/agent_windows.go @@ -622,8 +622,9 @@ func (a *Agent) AgentUpdate(url, inno, version string) error { return err } if r.IsError() { - a.Logger.Errorln("Download failed with status code", r.StatusCode()) - return err + ret := fmt.Sprintf("Download failed with status code %d", r.StatusCode()) + a.Logger.Errorln(ret) + return errors.New(ret) } innoLogFile := filepath.Join(a.WinTmpDir, fmt.Sprintf("tacticalagent_update_v%s.txt", version))