mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-08 13:44:59 +00:00
refactor: simplify condition for running command with pexpect
This commit is contained in:
parent
e1c8a25e2e
commit
49925b892b
1 changed files with 1 additions and 6 deletions
|
@ -10,12 +10,7 @@ import pexpect
|
||||||
def run_cmd(command):
|
def run_cmd(command):
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if (
|
if sys.stdin.isatty() and hasattr(pexpect, "spawn") and platform.system() != "Windows":
|
||||||
False
|
|
||||||
and sys.stdin.isatty()
|
|
||||||
and hasattr(pexpect, "spawn")
|
|
||||||
and platform.system() != "Windows"
|
|
||||||
):
|
|
||||||
return run_cmd_pexpect(command)
|
return run_cmd_pexpect(command)
|
||||||
|
|
||||||
return run_cmd_subprocess(command)
|
return run_cmd_subprocess(command)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue