Skip to content

Commit 8daa25f

Browse files
Remove certificate from the keychain if an error occurs during install
1 parent 0a97918 commit 8daa25f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

certificates/install_darwin.go

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ func InstallCertificate(cert *paths.Path) error {
112112
if len(s) != 0 {
113113
oscmd := exec.Command("osascript", "-e", "display dialog \""+s+"\" buttons \"OK\" with title \"Arduino Agent: Error installing certificates\"")
114114
_ = oscmd.Run()
115+
_ = UninstallCertificates()
115116
return errors.New(s)
116117
}
117118
return nil

0 commit comments

Comments
 (0)