diff --git a/hub.go b/hub.go index 003d3d959..70b1c9dd3 100755 --- a/hub.go +++ b/hub.go @@ -26,9 +26,6 @@ import ( "strconv" "strings" - cert "github.com/arduino/arduino-create-agent/certificates" - "github.com/arduino/arduino-create-agent/config" - "github.com/arduino/arduino-create-agent/upload" log "github.com/sirupsen/logrus" ) @@ -183,9 +180,6 @@ func checkCmd(m []byte) { go spList(false) go spList(true) } else if strings.HasPrefix(sl, "downloadtool") { - // Always delete root certificates when we receive a downloadtool command - // Useful if the install procedure was not followed strictly (eg. manually) - cert.DeleteCertificates(config.GetCertificatesDir()) go func() { args := strings.Split(s, " ") var tool, toolVersion, pack, behaviour string diff --git a/systray/systray_real.go b/systray/systray_real.go index 74ed12c67..20db97118 100644 --- a/systray/systray_real.go +++ b/systray/systray_real.go @@ -101,6 +101,7 @@ func (s *Systray) start() { err := cert.InstallCertificate(certDir.Join("ca.cert.cer")) // if something goes wrong during the cert install we remove them, so the user is able to retry if err != nil { + log.Errorf("cannot install certificates something went wrong: %s", err) cert.DeleteCertificates(certDir) } s.Restart()