mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-07 13:15:00 +00:00
do not try pexpect on windows; fix time.clock error on windows
This commit is contained in:
parent
bcb3fa1b47
commit
ce397b71e8
4 changed files with 5 additions and 23 deletions
|
@ -3,6 +3,8 @@ import subprocess
|
|||
import sys
|
||||
from io import BytesIO
|
||||
|
||||
import pexpect
|
||||
|
||||
|
||||
def run_cmd(command):
|
||||
import sys
|
||||
|
@ -10,9 +12,7 @@ def run_cmd(command):
|
|||
if not sys.stdin.isatty():
|
||||
return run_cmd_subprocess(command)
|
||||
|
||||
try:
|
||||
import pexpect # noqa: F401
|
||||
except ImportError:
|
||||
if hasattr(pexpect, "spawn"):
|
||||
return run_cmd_subprocess(command)
|
||||
|
||||
return run_cmd_pexpect(command)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue