Skip to content

Commit f69980a

Browse files
Update certificates regardless of the default browser
1 parent f43b0e4 commit f69980a

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

main.go

+12-14
Original file line numberDiff line numberDiff line change
@@ -369,20 +369,18 @@ func loop() {
369369
}
370370
}
371371

372-
// check if the HTTPS certificates are expired and prompt the user to update them on macOS
373-
if runtime.GOOS == "darwin" && cert.GetDefaultBrowserName() == "Safari" {
374-
if *installCerts {
375-
if config.CertsExist() {
376-
cert.PromptExpiredCerts(config.GetCertificatesDir())
377-
} else if cert.PromptInstallCertsSafari() {
378-
// installing the certificates from scratch at this point should only happen if
379-
// something went wrong during previous installation attempts
380-
cert.GenerateAndInstallCertificates(config.GetCertificatesDir())
381-
} else {
382-
err = config.SetInstallCertsIni(configPath.String(), "false")
383-
if err != nil {
384-
log.Panicf("config.ini cannot be parsed: %s", err)
385-
}
372+
// check if the HTTPS certificates are expired or expiring and prompt the user to update them on macOS
373+
if runtime.GOOS == "darwin" && *installCerts {
374+
if config.CertsExist() {
375+
cert.PromptExpiredCerts(config.GetCertificatesDir())
376+
} else if cert.PromptInstallCertsSafari() {
377+
// installing the certificates from scratch at this point should only happen if
378+
// something went wrong during previous installation attempts
379+
cert.GenerateAndInstallCertificates(config.GetCertificatesDir())
380+
} else {
381+
err = config.SetInstallCertsIni(configPath.String(), "false")
382+
if err != nil {
383+
log.Panicf("config.ini cannot be parsed: %s", err)
386384
}
387385
}
388386
}

0 commit comments

Comments
 (0)