Skip to content

Commit

Permalink
fix(cli): more friendly error alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
markthree committed Jul 9, 2023
1 parent 708c68f commit 84dd4c8
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,16 @@ async function main() {
if (argv.help) {
printUsage();
} else {
const size = await getFolderSizeBin(
argv.base,
argv.pretty,
{ loose: argv.loose },
);
console.log(size);
try {
const size = await getFolderSizeBin(
argv.base,
argv.pretty,
{ loose: argv.loose },
);
console.log(size);
} catch (error) {
console.error(error.message);
}
}
}

Expand Down

0 comments on commit 84dd4c8

Please sign in to comment.