From c4993fceec59b89a1318b8f8cb4a1ec660175532 Mon Sep 17 00:00:00 2001 From: Enrique Benitez Date: Tue, 9 May 2017 15:44:29 -0500 Subject: [PATCH] 1.1.1 - reapply fix for "no such file or directory" issue --- package.json | 2 +- wipe-modules.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index cc10914..7867a5a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wipe-modules", - "version": "1.1.0", + "version": "1.1.1", "description": "A little agent that removes the node_modules folder of non-active projects", "license": "MIT", "repository": "bntzio/wipe-modules", diff --git a/wipe-modules.sh b/wipe-modules.sh index 10b162d..e2ac06b 100644 --- a/wipe-modules.sh +++ b/wipe-modules.sh @@ -37,6 +37,9 @@ wipe() { dir="$1" # now dir is the 1st parameter ($1) dir="${dir%/}" # strip trailing slash dir="${dir##*/}" # strip path and leading slash + if [ "$dir" == "." ]; then + continue + fi cd "$dir" if [ $(find . -maxdepth 1 -type d -name 'node_modules') ]; then # if $dry is not --dry (or -D) then just print the name of the folder that