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

Option to allow --unsafe-params #2

Open
mariosant opened this issue Sep 9, 2017 · 4 comments
Open

Option to allow --unsafe-params #2

mariosant opened this issue Sep 9, 2017 · 4 comments

Comments

@mariosant
Copy link
Contributor

I came down to a strange issue lately. I wanted to publish a private npm module, which used the prepare hook in order to get built before this.
I am using webpack for the build process and while running fine locally, this is what I got on Wercker:

npm WARN lifecycle xxxxxxxxxxxxxxxxxxx~prepare: cannot run in wd %s %s (wd=%s) 

The issue here is that npm is being executed as root user and it doesn't really like that. This can be resolved though, by passing the parameter --unsafe-param while running npm publish.

My suggestion here would be to add an option to the step, ie PASS_UNSAFE_PARAM and if this is set, the step will pass the parameter to npm publish.

What do you think guys?

@mariosant
Copy link
Contributor Author

@Starefossen ?

@Starefossen
Copy link
Contributor

Sorry for not responding earlier. Yes, it sounds reasonable that one should be able to configure this, but maybe off by default?

@mariosant
Copy link
Contributor Author

Off by default, available when someone asks it, it is!

@hillct
Copy link

hillct commented Nov 27, 2017

Another key place where this is important, is in Docker container builds which will always run as root. In fact, for the moment, I'm going to have to fall back to the old prepublish behavior, in order to get out docker images to continue to build reliably, at least in the short term.

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

3 participants