From 1b4c206496282a86d86fe9d171d2eead246cbe43 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 b8823de..28292d0 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'); }