mirror of
https://github.com/FiloSottile/mkcert.git
synced 2025-10-14 00:41:40 +08:00
Add support for Firefox Developer Edition
This also fixes a bug where we wouldn't install to Chrome on Linux if Firefox wasn't also present. Closes #48 Updates #51
This commit is contained in:
@@ -17,7 +17,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
FirefoxPath = "/Applications/Firefox.app"
|
|
||||||
FirefoxProfile = os.Getenv("HOME") + "/Library/Application Support/Firefox/Profiles/*"
|
FirefoxProfile = os.Getenv("HOME") + "/Library/Application Support/Firefox/Profiles/*"
|
||||||
CertutilInstallHelp = "brew install nss"
|
CertutilInstallHelp = "brew install nss"
|
||||||
NSSBrowsers = "Firefox"
|
NSSBrowsers = "Firefox"
|
||||||
|
@@ -15,7 +15,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
FirefoxPath = "/usr/bin/firefox"
|
|
||||||
FirefoxProfile = os.Getenv("HOME") + "/.mozilla/firefox/*"
|
FirefoxProfile = os.Getenv("HOME") + "/.mozilla/firefox/*"
|
||||||
CertutilInstallHelp = `apt install libnss3-tools" or "yum install nss-tools`
|
CertutilInstallHelp = `apt install libnss3-tools" or "yum install nss-tools`
|
||||||
NSSBrowsers = "Firefox and/or Chrome/Chromium"
|
NSSBrowsers = "Firefox and/or Chrome/Chromium"
|
||||||
|
@@ -17,8 +17,13 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
_, err := os.Stat(FirefoxPath)
|
for _, path := range []string{
|
||||||
hasNSS = !os.IsNotExist(err)
|
"/usr/bin/firefox", nssDB, "/Applications/Firefox.app",
|
||||||
|
"/Applications/Firefox Developer Edition.app",
|
||||||
|
} {
|
||||||
|
_, err := os.Stat(path)
|
||||||
|
hasNSS = hasNSS || !os.IsNotExist(err)
|
||||||
|
}
|
||||||
|
|
||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
case "darwin":
|
case "darwin":
|
||||||
@@ -32,9 +37,7 @@ func init() {
|
|||||||
hasCertutil = !os.IsNotExist(err)
|
hasCertutil = !os.IsNotExist(err)
|
||||||
|
|
||||||
case "linux":
|
case "linux":
|
||||||
_, err := os.Stat(nssDB)
|
var err error
|
||||||
hasNSS = hasNSS && !os.IsNotExist(err)
|
|
||||||
|
|
||||||
certutilPath, err = exec.LookPath("certutil")
|
certutilPath, err = exec.LookPath("certutil")
|
||||||
hasCertutil = err == nil
|
hasCertutil = err == nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user