Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid including node binary path if it already presented #3

Closed
wants to merge 2 commits into from

Conversation

stiig
Copy link

@stiig stiig commented Nov 29, 2018

To preventing override user order in PATH(which used in version managers, example, rvm(ruby version manager))

To preventing override user order in PATH(which used in version managers, example, rvm(ruby version manager))
@stiig stiig changed the title Avoid including node binary path if it already present Avoid including node binary path if it already presented Dec 5, 2018
Copy link

@evocateur evocateur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a test, as well.

@@ -19,7 +19,11 @@ module.exports = opts => {
}

// ensure the running `node` binary is used
ret.push(path.dirname(process.execPath));
const binNodePth = path.dirname(process.execPath);
const testExisting = new RegExp(`:${binNodePth}:`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work on windows, you need to use ${path.delimiter} instead of :

@ehmicky
Copy link
Contributor

ehmicky commented Mar 13, 2019

I opened PR #4 to make this PR move forward.

@sindresorhus
Copy link
Owner

Closing this in favor of #5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants