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

Test environment: TMPDIR is path to "musicbot" package when it should be unset #5

Open
icedream opened this issue Oct 5, 2017 · 1 comment
Assignees
Labels

Comments

@icedream
Copy link
Collaborator

icedream commented Oct 5, 2017

No description provided.

@icedream icedream added the bug label Oct 5, 2017
@icedream icedream self-assigned this Oct 5, 2017
@icedream
Copy link
Collaborator Author

icedream commented Oct 5, 2017

Turns out that this is an issue caused in npm itself where if the unsafe-perm flag is not set, it will enforce the TMPDIR environment variable to the working directory (when running as root as we're currently doing in Docker). I did a respective grep:

[...]
/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:    if (!npm.config.get('unsafe-perm')) env.TMPDIR = wd
[...]

Solutions:

  • The correct solution: Switch to another user for running the app, even when debugging and running locally
  • The quick work-around: Run npm start with unsafe-perm.

icedream added a commit that referenced this issue Oct 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant