commit 56ec98e1a6ae3c54a8572d2999d63b37146088c8
parent 836f272faf498aaea4db21a05094270bc56a5e0e
Author: Andrew Laack <andrew@laack.co>
Date: Fri, 9 Oct 2026 22:18:10 -0500
Fixed issue w/ headless execution causing problems
Co-authored-by: Vim
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/main.cpp b/src/main.cpp
@@ -1,6 +1,7 @@
#include <locale.h>
#include <ncurses.h>
#include <unctrl.h>
+#include <unistd.h>
#include <cassert>
#include <csignal>
@@ -83,6 +84,10 @@ int main(int argc, char** argv) {
setlocale(LC_CTYPE, ""); // emojis and such
+ if(!isatty(STDIN_FILENO) || !isatty(STDOUT_FILENO)) {
+ std::cout << "This program must be executed interactively" << std::endl;
+ return 1;
+ }
initscr();
set_escdelay(25);
noecho(); // don't echo user inputs