Skip to content

is STDIN.tty? really needed? #4

Description

@Sparkboxx

In https://github.com/opener-project/language-identifier/blob/master/lib/opener/language_identifier/cli.rb#L72 a call is being made to see if STDIN.tty?

If true - input is set to nil
If false - input is set to STDIN.read

I don't immediately see the reason for this, so the question is: why?
It seems to be broken now, I get a "length" is not defined for nil error.

Did you consider maybe using ARGF.read so that the LanguageIdentifier works both with STDIN and with filenames?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions