Skip to content

Getting "stty: stdin isn't a terminal" errors when piping input to my app #803

@kotfu

Description

@kotfu

I have a cmd2 based app which can accept commands piped via stdin, like so:

$ echo some_command | my_app

When used in this way, I get the following error:

"stty: stdin isn't a terminal"

I believe this error is caused by a bug in the _run_cmdfinalization_hooks() method of cmd2.Cmd. If stdout is a tty, and we are not on windows, it runs stty sane, which generates this error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions