Skip to content

Commit

Permalink
Improve regexp for yarn executable content on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
rosen-vladimirov committed Mar 22, 2018
1 parent 4d4f531 commit 391dbd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 391dbd9

Please sign in to comment.