Skip to content

Commit

Permalink
fix pexpect logic
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-gauthier committed Aug 29, 2024
1 parent 9b4ee19 commit 6e2a423
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions aider/run_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@
def run_cmd(command):
import sys

if not sys.stdin.isatty():
return run_cmd_subprocess(command)
if sys.stdin.isatty() and hasattr(pexpect, "spawn"):
return run_cmd_pexpect(command)

if hasattr(pexpect, "spawn"):
return run_cmd_subprocess(command)

return run_cmd_pexpect(command)
return run_cmd_subprocess(command)


def run_cmd_subprocess(command):
Expand Down

0 comments on commit 6e2a423

Please sign in to comment.