Skip to content

Commit 4bfd50d

Browse files
committed
fetch-bower: Add a --quiet option
1 parent 9430c94 commit 4bfd50d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/bower2nix.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,11 @@ function parseFetchBowerArgs() {
426426
metavar: 'DIR'
427427
});
428428

429+
parser.addArgument([ '--quiet', '-q' ], {
430+
help: "Don't print package json",
431+
action: "storeTrue"
432+
});
433+
429434
parser.addArgument([ 'name' ], {
430435
help: 'Package name',
431436
type: 'string',
@@ -460,5 +465,7 @@ export async function fetchBowerMain() {
460465
process.env.HOME = tmpdir;
461466

462467
let info = await fetchBower(out, args.name, args.target, args.version);
463-
process.stdout.write(JSON.stringify(info));
468+
if (!args.quiet) {
469+
process.stdout.write(JSON.stringify(info));
470+
}
464471
}

0 commit comments

Comments
 (0)