fix: add interactive flag to shell spawn in pexpect command

This commit is contained in:
Paul Gauthier 2024-12-03 07:45:46 -08:00 committed by Paul Gauthier (aider)
parent 0b68eea44a
commit 631ee98738

View file

@ -113,7 +113,7 @@ def run_cmd_pexpect(command, verbose=False, cwd=None):
# Use the shell from SHELL environment variable
if verbose:
print("Running pexpect.spawn with shell:", shell)
child = pexpect.spawn(shell, args=["-c", command], encoding="utf-8", cwd=cwd)
child = pexpect.spawn(shell, args=["-i", "-c", command], encoding="utf-8", cwd=cwd)
else:
# Fall back to spawning the command directly
if verbose: