Skip to content

Commit 8ac2af7

Browse files
committed
tools: add preinstall script for npm on OS X
Make sure we cleanly remove npm before installing on OS X
1 parent 3becac2 commit 8ac2af7

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

tools/osx-pkg-preinstall.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
# TODO Can this be done inside the .pmdoc?
3+
# TODO Can we extract $PREFIX from the installer?
4+
5+
set -e
6+
7+
rm -rf /usr/local/lib/node_modules/npm

tools/osx-pkg.pmdoc/02npm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<mod>installTo.isAbsoluteType</mod>
2020
</config>
2121
<scripts>
22+
<preinstall relative="true" mod="true">osx-pkg-preinstall.sh</preinstall>
2223
<postinstall relative="true" mod="true">osx-pkg-postinstall.sh</postinstall>
2324
</scripts>
2425
</pkgref>

0 commit comments

Comments
 (0)