Skip to content

Commit

Permalink
Add npm preinstall script
Browse files Browse the repository at this point in the history
  • Loading branch information
fhemberger authored and rvagg committed Jun 8, 2016
1 parent a828c74 commit d876918
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tools/osx-pkg/osx-pkg.pkgproj
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,13 @@
<key>PATH_TYPE</key>
<integer>1</integer>
</dict>
<key>PREINSTALL_PATH</key>
<dict>
<key>PATH</key>
<string>scripts/npm_preinstall.sh</string>
<key>PATH_TYPE</key>
<integer>1</integer>
</dict>
<key>RESOURCES</key>
<array/>
</dict>
Expand Down Expand Up @@ -1655,7 +1662,7 @@
ZW50LVN0eWxlLVR5cGUiIGNvbnRlbnQ9InRleHQvY3NzIj4KPHRp
dGxlPjwvdGl0bGU+CjxtZXRhIG5hbWU9IkdlbmVyYXRvciIgY29u
dGVudD0iQ29jb2EgSFRNTCBXcml0ZXIiPgo8bWV0YSBuYW1lPSJD
b2NvYVZlcnNpb24iIGNvbnRlbnQ9IjEyNjUuMjEiPgo8c3R5bGUg
b2NvYVZlcnNpb24iIGNvbnRlbnQ9IjE0MDQuMzQiPgo8c3R5bGUg
dHlwZT0idGV4dC9jc3MiPgo8L3N0eWxlPgo8L2hlYWQ+Cjxib2R5
Pgo8L2JvZHk+CjwvaHRtbD4K
</data>
Expand Down
7 changes: 7 additions & 0 deletions tools/osx-pkg/scripts/npm_preinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
# TODO Can this be done inside the .pmdoc?
# TODO Can we extract $PREFIX from the installer?

set -e

rm -rf /usr/local/lib/node_modules/npm

0 comments on commit d876918

Please sign in to comment.