From 38b3cc60c3fd971240837e9f5785b7a861a978cb Mon Sep 17 00:00:00 2001 From: Alexandre Nolan Tanner Date: Tue, 14 Jun 2022 14:09:14 +0200 Subject: [PATCH 1/2] fix: find protoc in path also in windows --- packages/protoc/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/protoc/util.js b/packages/protoc/util.js index d4fd4fb5..04d65e02 100644 --- a/packages/protoc/util.js +++ b/packages/protoc/util.js @@ -294,7 +294,7 @@ module.exports.findProtocInPath = function (envPath) { const candidates = envPath.split(path.delimiter) .filter(p => !p.endsWith(`node_modules${path.sep}.bin`)) // make sure to exlude ... .filter(p => !p.endsWith(`.npm-global${path.sep}bin`)) // ... - .map(p => path.join(p, "protoc")) // we are looking for "protoc" + .map(p => path.join(p, os.platform() === 'win32' ? 'protoc.exe' : "protoc")) // we are looking for "protoc" .map(p => p[0] === "~" ? path.join(os.homedir(), p.slice(1)) : p) // try expand "~" ; for (let c of candidates) { From 09b86c7169ede7e6fef7b91c786e8ce8ed457399 Mon Sep 17 00:00:00 2001 From: Alexandre Nolan Tanner Date: Tue, 14 Jun 2022 14:15:30 +0200 Subject: [PATCH 2/2] fix: update quotes --- packages/protoc/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/protoc/util.js b/packages/protoc/util.js index 04d65e02..fc7c45ff 100644 --- a/packages/protoc/util.js +++ b/packages/protoc/util.js @@ -294,7 +294,7 @@ module.exports.findProtocInPath = function (envPath) { const candidates = envPath.split(path.delimiter) .filter(p => !p.endsWith(`node_modules${path.sep}.bin`)) // make sure to exlude ... .filter(p => !p.endsWith(`.npm-global${path.sep}bin`)) // ... - .map(p => path.join(p, os.platform() === 'win32' ? 'protoc.exe' : "protoc")) // we are looking for "protoc" + .map(p => path.join(p, os.platform() === "win32" ? "protoc.exe" : "protoc")) // we are looking for "protoc" .map(p => p[0] === "~" ? path.join(os.homedir(), p.slice(1)) : p) // try expand "~" ; for (let c of candidates) {