mirror of
https://github.com/sbrl/terrain50-cli.git
synced 2024-11-22 06:53:01 +00:00
identify: fix stdin input (?)
This commit is contained in:
parent
2b164ea633
commit
a43429d3ad
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue