Skip to content

Commit 7ae76b0

Browse files
committed
Fix: Account for missing stdin / stdout when checking whether the runtime environment is interactive
1 parent 5ffed10 commit 7ae76b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sqlmesh/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ def is_cicd_environment() -> bool:
126126

127127

128128
def is_interactive_environment() -> bool:
129+
if sys.stdin is None or sys.stdout is None:
130+
return False
129131
return sys.stdin.isatty() and sys.stdout.isatty()
130132

131133

0 commit comments

Comments
 (0)