From 7238cbfc16bf6823a20010420bc8e281dab7de5c Mon Sep 17 00:00:00 2001 From: Kunal Aggarwal Date: Wed, 27 Jan 2021 16:53:55 +0530 Subject: [PATCH] Handling of key.pem when path contains spaces When the path to key.pem contains spaces, the hash does not get generated during development and therefore `key` in manisfest.json goes as a blank string and chrome does not allow loading the unpacked extension. Fixing this issue. --- lib/signing-key.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/signing-key.js b/lib/signing-key.js index baef78d..49ac8ad 100644 --- a/lib/signing-key.js +++ b/lib/signing-key.js @@ -7,7 +7,7 @@ exports.generateKey = () => execSync('openssl genrsa 2048 | openssl pkcs8 -topk8 exports.hashKey = (keyFile) => new Promise((resolve, reject) => { - exec(`openssl rsa -in ${keyFile} -pubout -outform DER | openssl base64 -A`, (error, stdout) => { + exec(`openssl rsa -in "${keyFile}" -pubout -outform DER | openssl base64 -A`, (error, stdout) => { if (error) { // node couldn't execute the command return reject(error)