diff options
author | June McEnroe <june@causal.agency> | 2021-01-31 15:36:21 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-01-31 15:36:21 -0500 |
commit | 0c3433ca4e1ffcee4246305a8170ccb005d2d4aa (patch) | |
tree | ea824f44599db8d944ddd32ffd28cfdc9565834a | |
parent | Launch game immediately with SSH_ORIGINAL_COMMAND (diff) | |
download | play-0c3433ca4e1ffcee4246305a8170ccb005d2d4aa.tar.gz play-0c3433ca4e1ffcee4246305a8170ccb005d2d4aa.zip |
Check isatty
Diffstat (limited to '')
-rw-r--r-- | play.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/play.c b/play.c index e83ab7e..a9dcc34 100644 --- a/play.c +++ b/play.c @@ -248,7 +248,11 @@ int main(int argc, char *argv[]) { return EX_OK; } + if (!isatty(STDOUT_FILENO)) { + errx(EX_USAGE, "not a tty; use ssh -t"); + } curse(); + const struct Game *game = menu(); if (!game) goto done; erase(); |