Skip to content

Commit 2526e1d

Browse files
committed
Remove node_modules if folder is empty
1 parent cb069d4 commit 2526e1d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/osx-pkg/scripts/uninstall.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,9 @@ if [ -f /tmp/iojs-run-uninstall ]; then
1111
rm -f $DIR_PREFIX/share/man/man1/iojs.1
1212
rm -f $DIR_PREFIX/share/systemtap/tapset/node.stp
1313

14+
if [ ! "$(ls -A $DIR_PREFIX/lib/node_modules)" ]; then
15+
rm -rf $DIR_PREFIX/lib/node_modules
16+
fi
17+
1418
rm -f /tmp/iojs-run-uninstall
1519
fi

0 commit comments

Comments
 (0)