From 930ce038951b3ec22a20810b23bf9d3506c2c6d6 Mon Sep 17 00:00:00 2001 From: Anders Evenrud Date: Sat, 11 Apr 2020 00:13:21 +0200 Subject: [PATCH] Updated package installation failure cleanup (#28) --- src/packages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages.js b/src/packages.js index 9ff4d46..ac5ead1 100644 --- a/src/packages.js +++ b/src/packages.js @@ -187,7 +187,7 @@ class Packages { // FIXME: npm packages have a 'package' subdirectory if (!await fs.exists(path.resolve(target, 'metadata.json'))) { - await fs.unlink(target); + await fs.remove(target); throw new Error('Invalid package'); }