mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
feat: Check if stdin is a TTY before using pexpect in run_interactive_command
This commit is contained in:
parent
71066b8954
commit
8af705482e
1 changed files with 5 additions and 0 deletions
|
@ -15,6 +15,11 @@ IMAGE_EXTENSIONS = {".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".webp"}
|
|||
|
||||
|
||||
def run_interactive_command(command):
|
||||
import sys
|
||||
|
||||
if not sys.stdin.isatty():
|
||||
return run_interactive_command_subprocess(command)
|
||||
|
||||
try:
|
||||
import pexpect # noqa: F401
|
||||
except ImportError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue