diff --git a/environment/vm/lima/certs.go b/environment/vm/lima/certs.go index e887ad1e3..96d629e23 100644 --- a/environment/vm/lima/certs.go +++ b/environment/vm/lima/certs.go @@ -23,6 +23,9 @@ func (l limaVM) copyCerts() error { // copy to cache dir dockerCertsCacheDir := filepath.Join(config.CacheDir(), "docker-certs") + if err := l.host.RunQuiet("rm", "-r", dockerCertsCacheDir); err != nil { + return err + } if err := l.host.RunQuiet("mkdir", "-p", dockerCertsCacheDir); err != nil { return err }