diff --git a/cli.js b/cli.js index 9335d4d..aea45c5 100755 --- a/cli.js +++ b/cli.js @@ -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); }