mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
feat: add __main__ to run_interactive_command with sys.argv
This commit is contained in:
parent
3bd4af23da
commit
55049c312e
1 changed files with 14 additions and 0 deletions
|
@ -353,3 +353,17 @@ def check_pip_install_extra(io, module, prompt, pip_install_cmd):
|
|||
|
||||
print()
|
||||
print(f"Failed to install {pip_install_cmd[0]}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
command = " ".join(sys.argv[1:])
|
||||
exit_status, output = run_interactive_command(command)
|
||||
print(f"Command exited with status {exit_status}")
|
||||
print("Full output:")
|
||||
print(output)
|
||||
else:
|
||||
print("Usage: python -m aider.utils <command>")
|
||||
sys.exit(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue