Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c092dd2

Browse files
committedMay 2, 2024·
Test on CI
1 parent 84687f8 commit c092dd2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed
 

‎certificates/certificates.go

+5-6
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import (
3030
"math/big"
3131
"net"
3232
"os"
33-
"os/exec"
3433
"strings"
3534
"time"
3635

@@ -286,18 +285,18 @@ func PromptInstallCertsSafari() bool {
286285
if GetDefaultBrowserName() != "Safari" {
287286
return false
288287
}
289-
oscmd := exec.Command("osascript", "-e", "display dialog \"The Arduino Agent needs a local HTTPS certificate to work correctly with Safari.\nIf you use Safari, you need to install it.\" buttons {\"Do not install\", \"Install the certificate for Safari\"} default button 1 with title \"Install Certificates\"")
290-
pressed, _ := oscmd.Output()
291-
return string(pressed) == "button returned:Install the certificate for Safari"
288+
//oscmd := exec.Command("osascript", "-e", "display dialog \"The Arduino Agent needs a local HTTPS certificate to work correctly with Safari.\nIf you use Safari, you need to install it.\" buttons {\"Do not install\", \"Install the certificate for Safari\"} default button 1 with title \"Install Certificates\"")
289+
//pressed, _ := oscmd.Output()
290+
return "" == "button returned:Install the certificate for Safari"
292291
}
293292

294293
// PromptExpiredCerts prompts the user to update the HTTPS certificates if they are using Safari
295294
func PromptExpiredCerts(certDir *paths.Path) {
296295
if expired, err := IsExpired(); err != nil {
297296
log.Errorf("cannot check if certificates are expired something went wrong: %s", err)
298297
} else if expired {
299-
oscmd := exec.Command("osascript", "-e", "display dialog \"The Arduino Agent needs a local HTTPS certificate to work correctly with Safari.\nYour certificate is expired or close to expiration. Do you want to update it?\" buttons {\"Do not update\", \"Update the certificate for Safari\"} default button 1 with title \"Update Certificates\"")
300-
if pressed, _ := oscmd.Output(); string(pressed) == "button returned:Update the certificate for Safari" {
298+
//oscmd := exec.Command("osascript", "-e", "display dialog \"The Arduino Agent needs a local HTTPS certificate to work correctly with Safari.\nYour certificate is expired or close to expiration. Do you want to update it?\" buttons {\"Do not update\", \"Update the certificate for Safari\"} default button 1 with title \"Update Certificates\"")
299+
if "" == "button returned:Update the certificate for Safari" {
301300
err := UninstallCertificates()
302301
if err != nil {
303302
log.Errorf("cannot uninstall certificates something went wrong: %s", err)

0 commit comments

Comments
 (0)
Please sign in to comment.