From 391dbd9735e0635e6d2c7187317cc38248cb849f Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Thu, 22 Mar 2018 22:48:53 +0200 Subject: [PATCH] Improve regexp for yarn executable content on Windows --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 51512a1..237005e 100644 --- a/lib/index.js +++ b/lib/index.js @@ -59,7 +59,7 @@ const getPathFromNpmConfig = (platform, packageName) => { const getPathFromCmdContent = (packageName, pathToExecutable) => { if (fs.existsSync(pathToExecutable)) { - const windowsPathRegExp = /(%~dp0[\w\\\.-]+node_modules).*?"/g; + const windowsPathRegExp = /(%~dp0[\w\\.-]+node_modules).*?"/g; const executableContent = fs.readFileSync(pathToExecutable).toString(); const match = windowsPathRegExp.exec(executableContent);