Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

^C on question causes traceback #20

Open
swtch1 opened this issue Jan 22, 2025 · 1 comment
Open

^C on question causes traceback #20

swtch1 opened this issue Jan 22, 2025 · 1 comment

Comments

@swtch1
Copy link

swtch1 commented Jan 22, 2025

What did you do?

# aider
Add .aider* to .gitignore (recommended)? (Y)es/(N)o [Yes]: <ctrl-c>

What did you expect to happen?

I expected aider to cleanly exit, or show me the friendly ^C again to exit message like it does in interactive mode.

What actually happened?

I got a traceback.

Traceback (most recent call last):
  File "/opt/homebrew/bin/aider", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/Cellar/aider/0.72.1/libexec/lib/python3.12/site-packages/aider/main.py", line 722, in main
    check_gitignore(git_root, io)
  File "/opt/homebrew/Cellar/aider/0.72.1/libexec/lib/python3.12/site-packages/aider/main.py", line 190, in check_gitignore
    if ask and not io.confirm_ask(f"Add {', '.join(patterns_to_add)} to .gitignore (recommended)?"):
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/aider/0.72.1/libexec/lib/python3.12/site-packages/aider/io.py", line 731, in confirm_ask
    res = self.prompt_session.prompt(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/aider/0.72.1/libexec/lib/python3.12/site-packages/prompt_toolkit/shortcuts/prompt.py", line 1035, in prompt
    return self.app.run(
           ^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/aider/0.72.1/libexec/lib/python3.12/site-packages/prompt_toolkit/application/application.py", line 1002, in run
    return asyncio.run(coro)
           ^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.8/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.8/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.8/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 673, in run_until_complete
    self.run_forever()
  File "/opt/homebrew/Cellar/[email protected]/3.12.8/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 640, in run_forever
    self._run_once()
  File "/opt/homebrew/Cellar/[email protected]/3.12.8/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1992, in _run_once
    handle._run()
  File "/opt/homebrew/Cellar/[email protected]/3.12.8/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/opt/homebrew/Cellar/aider/0.72.1/libexec/lib/python3.12/site-packages/prompt_toolkit/application/application.py", line 886, in run_async
    return await _run_async(f)
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/aider/0.72.1/libexec/lib/python3.12/site-packages/prompt_toolkit/application/application.py", line 746, in _run_async
    result = await f
             ^^^^^^^
KeyboardInterrupt
@joshuavial
Copy link
Owner

thanks, I'll have a look and see if I can reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants