From 7ae76b00dab04cc6845e801aee0fb7723a7e77e7 Mon Sep 17 00:00:00 2001 From: Iaroslav Zeigerman Date: Tue, 7 Oct 2025 09:28:18 -0700 Subject: [PATCH] Fix: Account for missing stdin / stdout when checking whether the runtime environment is interactive --- sqlmesh/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sqlmesh/__init__.py b/sqlmesh/__init__.py index 47e9bacce2..7712a41379 100644 --- a/sqlmesh/__init__.py +++ b/sqlmesh/__init__.py @@ -126,6 +126,8 @@ def is_cicd_environment() -> bool: def is_interactive_environment() -> bool: + if sys.stdin is None or sys.stdout is None: + return False return sys.stdin.isatty() and sys.stdout.isatty()