Unverified Commit e0e57354 authored by Ahmed Ayman's avatar Ahmed Ayman Committed by GitHub

fix-failed-to-generate-self-signed-certificate issue:#55891 (#55947)

- Related issues linked using fixes #55891

Wrap binaryPath, keyPath, certPath with double quotes
this with casing an error if there is a directory name has a space for ex. folder with name **test https**
parent 9e3c1829
...@@ -98,13 +98,13 @@ export async function createSelfSignedCertificate( ...@@ -98,13 +98,13 @@ export async function createSelfSignedCertificate(
: defaultHosts : defaultHosts
execSync( execSync(
`${binaryPath} -install -key-file ${keyPath} -cert-file ${certPath} ${hosts.join( `"${binaryPath}" -install -key-file "${keyPath}" -cert-file "${certPath}" ${hosts.join(
' ' ' '
)}`, )}`,
{ stdio: 'ignore' } { stdio: 'ignore' }
) )
const caLocation = execSync(`${binaryPath} -CAROOT`).toString().trim() const caLocation = execSync(`"${binaryPath}" -CAROOT`).toString().trim()
if (!fs.existsSync(keyPath) || !fs.existsSync(certPath)) { if (!fs.existsSync(keyPath) || !fs.existsSync(certPath)) {
throw new Error('Certificate files not found') throw new Error('Certificate files not found')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment