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

Issue With PATH Ordering #36

Open
andrewburgess opened this issue Aug 1, 2016 · 4 comments
Open

Issue With PATH Ordering #36

andrewburgess opened this issue Aug 1, 2016 · 4 comments

Comments

@andrewburgess
Copy link

I'm not sure if I've misconfigured something, but the PATH environment variable seems to be putting /usr/bin in the middle, before the N_PREFIX directory, which means the system level version of node is used instead of the one just downloaded via n

Output of $PATH after n activates the version requested

/home/strider/builds/data/${project-branch}/node_modules/.bin
/home/strider/builds/data/node_modules/.bin
/home/strider/builds/node_modules/.bin
/home/strider/node_modules/.bin
/home/node_modules/.bin
/node_modules/.bin
/usr/bin
/home/strider/app/node_modules/strider-node/node_modules/n/bin
/home/strider/builds/data/${project-branch}/.n/bin
/home/strider/app/node_modules/strider-node/node_modules/.bin
/home/strider/builds/data/${project-branch}/${job-id}.globals/node_modules/.bin




/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin

I'm not sure where that /usr/bin comes from in the middle, but I'm wondering if maybe https://github.com/Strider-CD/strider-node/blob/master/worker.js#L82 needs to be flipped so that the new paths are prepended to ret.path instead of appended.

@knownasilya
Copy link
Member

Sounds like something you can submit as a PR and test it with your setup to see if it makes a difference 👍

@andrewburgess
Copy link
Author

@knownasilya I've tried switching it in my local instance and I'm not seeing a change in the PATH environment variable.

I'm not familiar with how Strider is architected. Where is the PATH environment variable set up? Trying to make that switch didn't seem to show any difference in the PATH contents, nor did trying to set ret.env.PATH.

@andrewburgess
Copy link
Author

Running a few more experiments, it looks like ret.path is appended to a PATH variable somewhere else in Strider (as in, all of those .bin directories and the /usr/bin are set elsewhere and then the additions from this plugin are appended afterwards).

Any ideas as to where I might be able to look?

@knownasilya
Copy link
Member

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

No branches or pull requests

2 participants