Skip to content

Commit e4845e0

Browse files
authored
Catch errors from stdin.buffer()
Found by this proposed standard rule: standard/eslint-config-standard#129
1 parent c3893c2 commit e4845e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/cmd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if (!arg) {
2222
process.exit(1)
2323
}
2424

25-
if (arg === '--stdin' || arg === '-') stdin.buffer().then(onTorrentId)
25+
if (arg === '--stdin' || arg === '-') stdin.buffer().then(onTorrentId).catch(error)
2626
else if (arg === '--version' || arg === '-v') console.log(require('../package.json').version)
2727
else onTorrentId(arg)
2828

0 commit comments

Comments
 (0)