Skip to content

Commit ecfbda9

Browse files
authored
Fix handling of level (#7)
1 parent 4ab33ee commit ecfbda9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cli.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ if (!input && process.stdin.isTTY) {
4040
const source = input ? fs.createReadStream(input) : process.stdin;
4141

4242
const options = {};
43-
options.level = cli.flags.level;
43+
if (cli.flags.level) {
44+
options.level = cli.flags.level;
45+
}
4446

4547
source.pipe(gzipSize.stream(options)).on('gzip-size', size => {
4648
console.log(cli.flags.raw ? size : prettyBytes(size));

0 commit comments

Comments
 (0)