Skip to content

Commit

Permalink
feat: ensure to cleanup after npm crash
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Oct 24, 2018
1 parent dd453d0 commit 6a84450
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/install-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const linkPackage = async (packagePath, packageName) => {
});
} catch (error) {
log.error("npm link of %s crashed:\n%#s", packageName, error.stderr);
await cleanupNpmInstall(packagePath);
if (
(await realpath(resolve(await getNpmModulesPath(), packageName), { loose: true })) ===
packagePath
Expand Down

0 comments on commit 6a84450

Please sign in to comment.