fix nil error being returned
This commit is contained in:
parent
5a23a55e39
commit
ee19c7a4fc
1 changed files with 3 additions and 2 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue