Skip to content

Commit

Permalink
add error loc logging
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Feb 14, 2020
1 parent 7035a56 commit aad5676
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,10 @@ export async function cli(args: string[]) {

spinner.start();
const startTime = Date.now();
const result = await install(installTargets, {hasBrowserlistConfig, isExplicit}, config);
const result = await install(installTargets, {hasBrowserlistConfig, isExplicit}, config).catch((err) => {
err.loc && console.log('\n' + chalk.red.bold(`✘ ${err.loc.file}`));
throw err;
});

if (result) {
spinner.succeed(
Expand Down

0 comments on commit aad5676

Please sign in to comment.