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

NODE_ENV leaks into test run #21

Open
jaredly opened this issue Aug 20, 2013 · 6 comments
Open

NODE_ENV leaks into test run #21

jaredly opened this issue Aug 20, 2013 · 6 comments
Assignees

Comments

@jaredly
Copy link
Member

jaredly commented Aug 20, 2013

If you run strider with NODE_ENV=prod, npm install doesn't install dev modules.

Should we just block out the parent env entirely when running child processes? (with perhaps the exception of PATH)
https://github.com/Strider-CD/strider-simple-worker/blob/master/lib/job.js#L120

@ghost ghost assigned niallo Aug 20, 2013
@niallo
Copy link
Member

niallo commented Aug 20, 2013

Yeah, we should only whitelist certain variables:

$HOME, $PATH, $PAAS_NAME

@jaredly
Copy link
Member Author

jaredly commented Aug 20, 2013

do we need $HOME? tests really shouldn't be messing with it ... although
maybe for ssh stuff?

On Tue, Aug 20, 2013 at 10:43 AM, niallo notifications@github.com wrote:

Yeah, we should only whitelist certain variables:

$HOME, $PATH, $PAAS_NAME


Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-22959028
.

@niallo
Copy link
Member

niallo commented Aug 20, 2013

Many UNIX utilities expect $HOME to be available. NPM for example writes to $HOME/.npm

@jaredly
Copy link
Member Author

jaredly commented Aug 20, 2013

what if we make $HOME be the tmp directory where we're running the build?

On Tue, Aug 20, 2013 at 12:31 PM, niallo notifications@github.com wrote:

Many UNIX utilities expect $HOME to be available. NPM for example writes
to $HOME/.npm


Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-22966829
.

@niallo
Copy link
Member

niallo commented Aug 20, 2013

Seems to me that the expectation is HOME is whatever the shell sets. But as long as the location is writable I guess it's ok.

POSIX says (section 2.5.3):

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html

@jaredly
Copy link
Member Author

jaredly commented Aug 21, 2013

Yeah, I'm not married to either direction.

On Tue, Aug 20, 2013 at 2:31 PM, niallo notifications@github.com wrote:

Seems to me that the expectation is HOME is whatever the shell sets. But
as long as the location is writable I guess it's ok.

POSIX says (section 2.5.3):

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html


Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-22975286
.

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