Skip to content

Commit

Permalink
Remove node_modules if folder is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
remixz committed Mar 5, 2015
1 parent cb069d4 commit 2526e1d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/osx-pkg/scripts/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ if [ -f /tmp/iojs-run-uninstall ]; then
rm -f $DIR_PREFIX/share/man/man1/iojs.1
rm -f $DIR_PREFIX/share/systemtap/tapset/node.stp

if [ ! "$(ls -A $DIR_PREFIX/lib/node_modules)" ]; then
rm -rf $DIR_PREFIX/lib/node_modules

This comment has been minimized.

Copy link
@bnoordhuis

bnoordhuis Mar 5, 2015

Member

rm -rf makes me slightly nervous. Would rmdir $DIR_PREFIX/lib/node_modules work? Also, shouldn't $DIR_PREFIX be quoted in case the path contains spaces?

fi

rm -f /tmp/iojs-run-uninstall
fi

0 comments on commit 2526e1d

Please sign in to comment.