Skip to content

Commit

Permalink
Handle ctrl-c by aborting
Browse files Browse the repository at this point in the history
Fixes #26
  • Loading branch information
dave1010 committed Dec 3, 2023
1 parent a7903a9 commit 073ad45
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion clipea/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ def clipea_main() -> None:
sys.exit('Error: dependency "llm" not found. Run "clipea setup" to install')

user_prompt = " ".join(sys.argv[1:])
router.commands_router(user_prompt)

try:
router.commands_router(user_prompt)
except KeyboardInterrupt:
print("\nAborted!")
sys.exit(1)


if __name__ == "__main__":
Expand Down

0 comments on commit 073ad45

Please sign in to comment.