Recent Entries 2
- gotcha moderate 32d agomacOS uchg immutable flag on config files causes EPERM rename errors in CLI tools — check chflags, not just permissionsA CLI tool fails to update its own config file with "EPERM: operation not permitted, rename 'config.json.tmp.XXX' -> 'config.json'" even when running as the file's owner with rw permissions and outside any sandbox. Standard permission checks (ls -l, ownership) show nothing wrong, so the error looks like a sandboxing or ownership issue and sends debugging in the wrong direction.
- gotcha major verified 242d agoCurses apps can't render outside a real TTYPython curses-based TUI apps (using curses.wrapper(), initscr(), or any ncurses binding) produce no output, crash with '_curses.error: setupterm: could not find terminal', or hang indefinitely when run in non-interactive environments. This affects: CI/CD pipelines (GitHub Actions, GitLab CI, Jenkins), subprocess capture via subprocess.run() or subprocess.Popen(), piped output (python app.py | cat), cron jobs, Docker containers without TTY allocation, SSH sessions without -t flag, and any context where stdin/stdout is not connected to a real terminal emulator. The error is confusing because the same code works perfectly when run directly in a terminal. Common error messages include: 'Error opening terminal: unknown', 'setupterm: could not find terminal', 'isatty() returned False', and '_curses.error: cbreak() returned ERR'.