diff options
| author | Christian Moritz | 2017-06-29 20:24:15 +0200 |
|---|---|---|
| committer | Christian Moritz | 2017-06-29 20:29:25 +0200 |
| commit | 466fe9841a9af915fe78c1fd8648a745610f942d (patch) | |
| tree | f206be1e14a3f7cc22aade2e12617eb3182cd6f8 /Library | |
| parent | fe39dbb78c2d62111358bfa00b6219ef43db7a4f (diff) | |
| download | brew-466fe9841a9af915fe78c1fd8648a745610f942d.tar.bz2 | |
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)
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/language/node.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/test/language/node_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/language/node.rb b/Library/Homebrew/language/node.rb index 02885d62f..03fa9e522 100644 --- a/Library/Homebrew/language/node.rb +++ b/Library/Homebrew/language/node.rb @@ -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? diff --git a/Library/Homebrew/test/language/node_spec.rb b/Library/Homebrew/test/language/node_spec.rb index b822c2350..e4ed9ee1f 100644 --- a/Library/Homebrew/test/language/node_spec.rb +++ b/Library/Homebrew/test/language/node_spec.rb @@ -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") |
