Skip to content

Commit

Permalink
Add support for short ignore arg
Browse files Browse the repository at this point in the history
  • Loading branch information
atjn committed Jul 20, 2024
1 parent 793287b commit 405ae70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/get-folder-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (!folder) {
process.exit(1);
}

const ignore = argv.ignore ? new RegExp(argv.ignore) : null;
const ignore = argv.ignore || argv.i ? new RegExp(argv.ignore || argv.i) : null;

const size = await getFolderSize.strict(path.resolve(folder), { ignore });
console.log((size / 1000 / 1000).toFixed(2) + " MB");

0 comments on commit 405ae70

Please sign in to comment.