From 535c17d01aa9f0f75acd6f42f0db3fcd5bd0af52 Mon Sep 17 00:00:00 2001 From: Tareq Sharafy Date: Sun, 18 Aug 2019 09:32:11 +0300 Subject: [PATCH] chore: delete node_modules contents but keep the dir itself PR-URL: https://github.com/npm/libcipm/pull/1 Credit: @tareqhs Close: #3 Reviewed-by: @claudiahdz --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 50f338c..42d05e1 100644 --- a/index.js +++ b/index.js @@ -137,7 +137,7 @@ class Installer { ) return BB.join( this.checkLock(), - stat && rimraf(path.join(this.prefix, 'node_modules')) + stat && rimraf(path.join(this.prefix, 'node_modules/*')) ) }).then(() => { // This needs to happen -after- we've done checkLock()