mirror of
https://github.com/FiloSottile/mkcert.git
synced 2024-11-25 16:51:09 +08:00
Add support for Firefox in a Snap for Ubuntu 22.04
Closes #327 Fixes #325
This commit is contained in:
parent
255b8304cd
commit
789f1b1c70
@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
FirefoxProfile = os.Getenv("HOME") + "/Library/Application Support/Firefox/Profiles/*"
|
||||
FirefoxProfiles = []string{os.Getenv("HOME") + "/Library/Application Support/Firefox/Profiles/*"}
|
||||
CertutilInstallHelp = "brew install nss"
|
||||
NSSBrowsers = "Firefox"
|
||||
)
|
||||
|
@ -15,8 +15,9 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
FirefoxProfile = os.Getenv("HOME") + "/.mozilla/firefox/*"
|
||||
NSSBrowsers = "Firefox and/or Chrome/Chromium"
|
||||
FirefoxProfiles = []string{os.Getenv("HOME") + "/.mozilla/firefox/*",
|
||||
os.Getenv("HOME") + "/snap/firefox/common/.mozilla/firefox/*"}
|
||||
NSSBrowsers = "Firefox and/or Chrome/Chromium"
|
||||
|
||||
SystemTrustFilename string
|
||||
SystemTrustCommand []string
|
||||
|
@ -27,6 +27,7 @@ var (
|
||||
"/usr/bin/firefox",
|
||||
"/usr/bin/firefox-nightly",
|
||||
"/usr/bin/firefox-developer-edition",
|
||||
"/snap/firefox",
|
||||
"/Applications/Firefox.app",
|
||||
"/Applications/FirefoxDeveloperEdition.app",
|
||||
"/Applications/Firefox Developer Edition.app",
|
||||
@ -128,8 +129,12 @@ func execCertutil(cmd *exec.Cmd) ([]byte, error) {
|
||||
}
|
||||
|
||||
func (m *mkcert) forEachNSSProfile(f func(profile string)) (found int) {
|
||||
profiles, _ := filepath.Glob(FirefoxProfile)
|
||||
var profiles []string
|
||||
profiles = append(profiles, nssDBs...)
|
||||
for _, ff := range FirefoxProfiles {
|
||||
pp, _ := filepath.Glob(ff)
|
||||
profiles = append(profiles, pp...)
|
||||
}
|
||||
for _, profile := range profiles {
|
||||
if stat, err := os.Stat(profile); err != nil || !stat.IsDir() {
|
||||
continue
|
||||
|
@ -17,7 +17,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
FirefoxProfile = os.Getenv("USERPROFILE") + "\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles"
|
||||
FirefoxProfiles = []string{os.Getenv("USERPROFILE") + "\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles"}
|
||||
CertutilInstallHelp = "" // certutil unsupported on Windows
|
||||
NSSBrowsers = "Firefox"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user