mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
refactor: move main logic into main() function
This commit is contained in:
parent
68a4f58480
commit
cc772d5074
1 changed files with 4 additions and 1 deletions
|
@ -71,7 +71,7 @@ def report_uncaught_exceptions():
|
|||
sys.excepthook = exception_handler
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def main():
|
||||
title = None
|
||||
if len(sys.argv) > 2:
|
||||
# Use the first command-line argument as the title and the second as the issue text
|
||||
|
@ -90,3 +90,6 @@ if __name__ == "__main__":
|
|||
issue_text = sys.stdin.read().strip()
|
||||
|
||||
report_github_issue(issue_text, title)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue