Skip to content

Commit

Permalink
Fix opening from stdin (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
Richienb committed Mar 26, 2020
1 parent 567f949 commit 3459e5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if (!input && process.stdin.isTTY) {
await open(input, cli.flags);
} else {
const stdin = await getStdin.buffer();
const type = fileType(stdin);
const type = fileType.fromBuffer(stdin);
const extension = cli.flags.extension || (type && type.ext) || 'txt';
await open(tempWrite.sync(stdin, `open.${extension}`), cli.flags);
}
Expand Down

0 comments on commit 3459e5a

Please sign in to comment.