mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-07 13:15:00 +00:00
feat: add touch_file function to handle file creation
This commit is contained in:
parent
441c07586d
commit
0f1b15942d
1 changed files with 9 additions and 0 deletions
|
@ -291,6 +291,15 @@ def format_tokens(count):
|
||||||
return f"{round(count / 1000)}k"
|
return f"{round(count / 1000)}k"
|
||||||
|
|
||||||
|
|
||||||
|
def touch_file(fname):
|
||||||
|
try:
|
||||||
|
fname.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
fname.touch()
|
||||||
|
return True
|
||||||
|
except OSError:
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def check_pip_install_extra(io, module, prompt, pip_install_cmd):
|
def check_pip_install_extra(io, module, prompt, pip_install_cmd):
|
||||||
if module:
|
if module:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue