mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
Adopt subprocess.run(shell=True) for /git
This commit is contained in:
parent
44aa5c6d63
commit
5756812938
2 changed files with 7 additions and 4 deletions
|
@ -1,6 +1,5 @@
|
|||
import json
|
||||
import re
|
||||
import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
@ -370,10 +369,15 @@ class Commands:
|
|||
"Run a git command"
|
||||
combined_output = None
|
||||
try:
|
||||
parsed_args = shlex.split("git " + args)
|
||||
args = "git " + args
|
||||
env = dict(GIT_EDITOR="true", **subprocess.os.environ)
|
||||
result = subprocess.run(
|
||||
parsed_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, env=env
|
||||
args,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
text=True,
|
||||
env=env,
|
||||
shell=True,
|
||||
)
|
||||
combined_output = result.stdout
|
||||
except Exception as e:
|
||||
|
|
|
@ -207,7 +207,6 @@ class GitRepo:
|
|||
return fnames
|
||||
|
||||
mtime = self.aider_ignore_file.stat().st_mtime
|
||||
dump(mtime)
|
||||
if mtime != self.aider_ignore_ts:
|
||||
self.aider_ignore_ts = mtime
|
||||
lines = self.aider_ignore_file.read_text().splitlines()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue