@@ -140,7 +140,7 @@ async function addCertificateToTrustStores(installCertutil: boolean): Promise<vo
140
140
try {
141
141
// Try to use certutil to install the cert automatically
142
142
debug ( 'adding devcert root CA to firefox' ) ;
143
- addCertificateToNSSCertDB ( '~/ Library/Application Support/Firefox/Profiles/*', installCertutil ) ;
143
+ addCertificateToNSSCertDB ( path . join ( process . env . HOME , ' Library/Application Support/Firefox/Profiles/*') , installCertutil ) ;
144
144
} catch ( e ) {
145
145
// Otherwise, open the cert in Firefox to install it
146
146
await openCertificateInFirefox ( '/Applications/Firefox.app/Contents/MacOS/firefox' ) ;
@@ -156,15 +156,15 @@ async function addCertificateToTrustStores(installCertutil: boolean): Promise<vo
156
156
try {
157
157
// Try to use certutil to install the cert automatically
158
158
debug ( 'adding devcert root CA to firefox' ) ;
159
- addCertificateToNSSCertDB ( '~/ .mozilla/firefox/*', installCertutil ) ;
159
+ addCertificateToNSSCertDB ( path . join ( process . env . HOME , ' .mozilla/firefox/*') , installCertutil ) ;
160
160
} catch ( e ) {
161
161
// Otherwise, open the cert in Firefox to install it
162
162
await openCertificateInFirefox ( 'firefox' ) ;
163
163
}
164
164
// Chrome
165
165
try {
166
166
debug ( 'adding devcert root CA to chrome' ) ;
167
- addCertificateToNSSCertDB ( '~/ .pki/nssdb', installCertutil ) ;
167
+ addCertificateToNSSCertDB ( path . join ( process . env . HOME , ' .pki/nssdb') , installCertutil ) ;
168
168
} catch ( e ) {
169
169
console . warn ( `
170
170
WARNING: Because you did not pass in \`installCertutil: true\` to devcert, we
0 commit comments