Skip to content

Commit

Permalink
fix: add error causes indefinite spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
larry.eliemenye authored and bbeesley committed Feb 21, 2022
1 parent e797629 commit 481170a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export async function addPackage(
recursive: true,
});

spinner.stop();
for (const g of await readdir(templatePath)) {
const maybePrefixed = options.prefix ? `${options.prefix}-${g}` : g;
const wantedTargetPath = tmpl(maybePrefixed);
Expand Down Expand Up @@ -91,5 +90,7 @@ export async function addPackage(
red(`\n\nCan't add ${name}${isUrl ? ` (source: ${pkg})` : ''}\n\n`),
ex,
);
} finally {
spinner.stop();
}
}

0 comments on commit 481170a

Please sign in to comment.