Skip to content

Commit 69be0f7

Browse files
committed
fix: wrap NSS db dir paths with quotes
1 parent f6a6f3f commit 69be0f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/root-authority.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ async function addCertificateToNSSCertDB(nssDirGlob: string, options: { installC
158158
debug(`checking to see if ${ potentialNSSDBDir } is a valid NSS database directory`);
159159
if (existsSync(path.join(potentialNSSDBDir, 'cert8.db'))) {
160160
debug(`Found legacy NSS database in ${ potentialNSSDBDir }, adding devcert ...`)
161-
run(`${ certutilPath } -A -d ${ potentialNSSDBDir } -t 'C,,' -i ${ rootCertPath } -n devcert`);
161+
run(`${ certutilPath } -A -d "${ potentialNSSDBDir }" -t 'C,,' -i ${ rootCertPath } -n devcert`);
162162
} else if (existsSync(path.join(potentialNSSDBDir, 'cert9.db'))) {
163163
debug(`Found modern NSS database in ${ potentialNSSDBDir }, adding devcert ...`)
164-
run(`${ certutilPath } -A -d sql:${ potentialNSSDBDir } -t 'C,,' -i ${ rootCertPath } -n devcert`);
164+
run(`${ certutilPath } -A -d "sql:${ potentialNSSDBDir }" -t 'C,,' -i ${ rootCertPath } -n devcert`);
165165
}
166166
});
167167
}

0 commit comments

Comments
 (0)