You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you pass cowsay -v or -V (asking for a version, but incorrectly), or some other unknown option, cowsay seems to hang after the error message.
[cowsay] $ ./bin/cowsay -V
Unknown option: V
That's because it's doing the default behavior of reading from stdin and waiting for input.
Might be better for it to just die and exit upon any unknown options.
Maybe should go broader, and ignore stdin if it's a terminal, so you only get the "read from stdin" behavior when piping to it. Might fix unintentional hangs in some cases.
UPDATE 2024-11-30: Looks like this also hangs on empty messages on the command line.
$ cowsay ''
It just sits there for me, doing nothing. If I type "Hello" and then Ctrl-D, it emits a "Hello" message. I think empty-string for the message argument is not being recognized as distinct from no message argument at all.
Changing that could be a breaking change. Users might be using '' to mean "read from stdin" like its current behavior does.
The text was updated successfully, but these errors were encountered:
If you pass
cowsay -v
or-V
(asking for a version, but incorrectly), or some other unknown option, cowsay seems to hang after the error message.That's because it's doing the default behavior of reading from stdin and waiting for input.
Might be better for it to just die and exit upon any unknown options.
Maybe should go broader, and ignore stdin if it's a terminal, so you only get the "read from stdin" behavior when piping to it. Might fix unintentional hangs in some cases.
UPDATE 2024-11-30: Looks like this also hangs on empty messages on the command line.
It just sits there for me, doing nothing. If I type "Hello" and then Ctrl-D, it emits a "Hello" message. I think empty-string for the message argument is not being recognized as distinct from no message argument at all.
Changing that could be a breaking change. Users might be using
''
to mean "read from stdin" like its current behavior does.The text was updated successfully, but these errors were encountered: