Skip to content

Allow output to non-tty STDOUT #17

@VarunKoyyalagunta

Description

@VarunKoyyalagunta

I want to run rmem in a scripted batch mode, by creating a file containing a list of commands and be able to do something like this -

cat file.cmd | ./rmem ... | tee log

(It's more complicated by the fact that I'm running the ./rmem ... part inside a container, but that doesn't really matter)

If I compile with UI=headless, rmem accepts input from a STDIN pipe. However I can't redirect STDOUT. I get the following error -

Output is not a terminal, '-interactive true' is not allowed.
  Use '-interactive false'

Removing the check, like so, achieves what I want -
VarunKoyyalagunta@8f0da61

I thought of creating some sort of -batch switch instead to override the check, but I'm not sure how useful the check is to begin with and removing it seemed easier.

If the above change is okay, I can create a PR. Or, if you prefer an additional switch like -batch, I can code that.

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