language/node: npm pack ignore prepublish scripts
This tells npm pack to don't run prepublish scripts at all. I think this is the best default because: * most modules don't have a prepublish script at all and aren't affected by this change * most prepublish scripts are calling devDeps, which would fail in our case, because (dev)Deps aren't installed at npm pack time until #2820 gets resolved * we favor npm registry tarball for formula downloads, which are already prepublished, so we would in the best case needlessly run prepublish a second time and in the worst case it would fail (because a clean step is required before running prepublish a second time in a row) * This change does the right thing for >99% of all the packages and would only affect packages with prepublish scripts downloaded from a non-npm registry tarball (like github tarballs) and with a prepublish script wich does no't require any devDep (unlike for cross platform)
This commit is contained in:
parent
fe39dbb78c
commit
466fe9841a
@ -10,7 +10,7 @@ module Language
|
||||
# fed to `npm install` only symlinks are created linking back to that
|
||||
# directory, consequently breaking that assumption. We require a tarball
|
||||
# because npm install creates a "real" installation when fed a tarball.
|
||||
pack_cmd = "npm pack -ddd"
|
||||
pack_cmd = "npm pack -ddd --ignore-scripts"
|
||||
ohai pack_cmd
|
||||
output = `#{pack_cmd}`
|
||||
if !$CHILD_STATUS.exitstatus.zero? || output.lines.empty?
|
||||
|
||||
@ -24,7 +24,7 @@ describe Language::Node do
|
||||
|
||||
describe "#std_npm_install_args" do
|
||||
npm_install_arg = "libexec"
|
||||
npm_pack_cmd = "npm pack -ddd"
|
||||
npm_pack_cmd = "npm pack -ddd --ignore-scripts"
|
||||
|
||||
it "raises error with non zero exitstatus" do
|
||||
allow(Language::Node).to receive(:`).with(npm_pack_cmd).and_return("error msg")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user