Skip to content

Commit

Permalink
Remove certificate from the keychain if an error occurs during install
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoPologruto committed Apr 10, 2024
1 parent 0a97918 commit 8daa25f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions certificates/install_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ func InstallCertificate(cert *paths.Path) error {
if len(s) != 0 {
oscmd := exec.Command("osascript", "-e", "display dialog \""+s+"\" buttons \"OK\" with title \"Arduino Agent: Error installing certificates\"")
_ = oscmd.Run()
_ = UninstallCertificates()
return errors.New(s)
}
return nil
Expand Down

0 comments on commit 8daa25f

Please sign in to comment.