Tone down the uninstalled root warnings

Some people might want to use mkcert to generate certificates without
installing the root after all.

Fixes #290
This commit is contained in:
Filippo Valsorda
2020-10-25 18:33:54 +01:00
parent e8068235db
commit 1ad7f56df4

View File

@@ -184,18 +184,18 @@ func (m *mkcert) Run(args []string) {
var warning bool var warning bool
if storeEnabled("system") && !m.checkPlatform() { if storeEnabled("system") && !m.checkPlatform() {
warning = true warning = true
log.Println("Warning: the local CA is not installed in the system trust store! ⚠️") log.Println("Note: the local CA is not installed in the system trust store.")
} }
if storeEnabled("nss") && hasNSS && CertutilInstallHelp != "" && !m.checkNSS() { if storeEnabled("nss") && hasNSS && CertutilInstallHelp != "" && !m.checkNSS() {
warning = true warning = true
log.Printf("Warning: the local CA is not installed in the %s trust store! ⚠️", NSSBrowsers) log.Printf("Note: the local CA is not installed in the %s trust store.", NSSBrowsers)
} }
if storeEnabled("java") && hasJava && !m.checkJava() { if storeEnabled("java") && hasJava && !m.checkJava() {
warning = true warning = true
log.Println("Warning: the local CA is not installed in the Java trust store! ⚠️") log.Println("Note: the local CA is not installed in the Java trust store.")
} }
if warning { if warning {
log.Println("Run \"mkcert -install\" to avoid verification errors ‼") log.Println("Run \"mkcert -install\" for certificates to be trusted automatically ⚠")
} }
} }