summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-01-31 15:36:21 -0500
committerJune McEnroe <june@causal.agency>2021-01-31 15:36:21 -0500
commit0c3433ca4e1ffcee4246305a8170ccb005d2d4aa (patch)
treeea824f44599db8d944ddd32ffd28cfdc9565834a
parentLaunch game immediately with SSH_ORIGINAL_COMMAND (diff)
downloadplay-0c3433ca4e1ffcee4246305a8170ccb005d2d4aa.tar.gz
play-0c3433ca4e1ffcee4246305a8170ccb005d2d4aa.zip
Check isatty
Diffstat (limited to '')
-rw-r--r--play.c4
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();