-
Notifications
You must be signed in to change notification settings - Fork 0
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
"postinstall" script being called with an extra argument #1
Comments
OK. I'll check it out, seems like a core issue |
I'm assuming it works fine with just This situation occurs because the package is meant to transfer any arguments to the script being called, and these are captured as whatever string after the command name. I'm going to make a couple of special cases for both install and update, so that the params can be ignored. I guess we can justify this as being incompatible with packages that use run-script-os internally, which could break (as this one) whenever installed or updated specifically. |
This is actually very similar in nature to kawatzaki/run-script-os#1 And it introduced a new argument that you can use within your package.json script declaration, such as: "scripts": {
"postinstall": "run-script-os --no-arguments", // JSON comments don't exist but here's the magic
"postinstall:default": "make -C worker" // now it shouldn't pass the arguments down
} I tried it with the little example I made, but it should work just fine, @ibc can you give it a try? UPDATE: Added some details about this issue on the README.md file, on the section "Lifecycle hooks". |
It works, THANKS! Closing issue. |
Not sure how to describe the issue, so will provide exact steps to reproduce it (in OSX at least):
Clone my mediasoup-demo project:
Such a project has a
server/package.json
that depends on my mediasoup "devel" branch.Install server deps:
$ cd server $ npm install
It will install
mediasoup
devel branch from GitHub.mediasoup
"devel" branch uses@dr.amaton/run-script-os
1.2.1, and here the "scripts" inpackage.json
.Now, within the
server/
folder of the mediasoup-demo project, let's just "update"mediasoup
:$ npm update mediasoup # or npm install mediasoup
It fails as follows:
As you can see in the mediasoup
package.json
, the "postinstall" script does the following:So in OSX it should just execute
make -C worker
. However, in the scenario above it is NOT executing that but instead the following:make -C worker "mediasoup"
And obviously, in the
worker/Makefile
of mediasoup there is not any "mediasoup" task, somake
fails.The problem is that, somehow,
run-script-os
is adding that "mediasoup" argument to the "postinstall:default" script, making it fail.The text was updated successfully, but these errors were encountered: