Skip to content

Commit

Permalink
Updated package installation failure cleanup (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersevenrud committed Apr 10, 2020
1 parent 1fe4c84 commit 1b4c206
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down

0 comments on commit 1b4c206

Please sign in to comment.