From a43429d3ad4d7c3ffef08c266894cff39be595ee Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 3 Jul 2020 16:12:33 +0100 Subject: [PATCH] identify: fix stdin input (?) --- src/Subcommands/identify/index.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Subcommands/identify/index.mjs b/src/Subcommands/identify/index.mjs index 5ede5e7..5aa0bef 100644 --- a/src/Subcommands/identify/index.mjs +++ b/src/Subcommands/identify/index.mjs @@ -21,7 +21,9 @@ export default async function(settings) { switch(settings.cli.mode) { case "single": let obj = Terrain50.Parse( - await fs.promises.readFile(settings.cli.input == "-" ? 0 : settings.cli.input, "utf-8") + settings.cli.input == "-" + ? fs.readFileSync(0, "utf-8") + : await fs.promises.readFile(settings.cli.input, "utf-8") ); summarise_obj(obj); break;