From 4a1ac14b74c0fe5617befbd691ab40550cb22543 Mon Sep 17 00:00:00 2001 From: Dave Nicolson Date: Sat, 22 Oct 2022 20:43:01 +0200 Subject: [PATCH] Add support for local npm prefix --- src/common.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common.js b/src/common.js index e3914cd..6626cbe 100644 --- a/src/common.js +++ b/src/common.js @@ -35,6 +35,8 @@ function getInstallationPath(callback) { if (env && env.npm_config_prefix) { dir = join(env.npm_config_prefix, 'bin'); + } else if (env && env.npm_config_local_prefix) { + dir = join(env.npm_config_local_prefix, join('node_modules', '.bin')); } else { return callback(new Error('Error finding binary installation directory')); }