Skip to content

Commit 047e2eb

Browse files
author
Sebastian McKenzie
committed
always clean in install command test
1 parent 5bd9d74 commit 047e2eb

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

test/commands/install.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,14 @@ async function run(flags, args, name, checkInstalled, beforeInstall) {
6767
let install = new Install("install", flags, args, config, reporter, lockfile);
6868
await install.init();
6969

70-
if (checkInstalled) {
71-
await checkInstalled(config, reporter);
70+
try {
71+
if (checkInstalled) {
72+
await checkInstalled(config, reporter);
73+
}
74+
} finally {
75+
// clean up
76+
await clean(cwd, removeLock);
7277
}
73-
74-
// clean up
75-
await clean(cwd, removeLock);
7678
}
7779

7880
async function getPackageVersion(config, packagePath) {

0 commit comments

Comments
 (0)