Exit the cli if user doesn't have the formatter installed while running codeflash (CF-644)#229
Conversation
…running codeflash AFTER init
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|
raising an OSError instead of a logger.error doesn't work somehow for me, works as expected though |
|
Thanks @KRRT7 for the help! |
|
@KRRT7 ready to merge |
1 similar comment
|
@KRRT7 ready to merge |
aseembits93
left a comment
There was a problem hiding this comment.
tested with ruff and black
PR Type
Bug fix
Description
Exit CLI if formatter not installed
Detect Black or uv formatter commands
Import subprocess, sys, and click modules
Gracefully handle missing executable errors
Changes walkthrough 📝
main.py
Verify formatter installation at runtimecodeflash/main.py
• Added
subprocess,sys, andclickimports• Checks if formatter
command is Black or uv
• Runs formatter to verify installation
•
Catches missing executable and exits