Skip to content

Commit 76df611

Browse files
Merge pull request #46 from codeflash-ai/cf-561
Updated cmd_init.py for better exception handling (CF-561)
2 parents 0b86128 + 5db6dba commit 76df611

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codeflash/cli_cmds/cmd_init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ def configure_pyproject_toml(setup_info: SetupInfo) -> None:
595595
if formatter in ["black", "ruff"]:
596596
try:
597597
subprocess.run([formatter], capture_output=True, check=False)
598-
except FileNotFoundError:
598+
except (FileNotFoundError, NotADirectoryError):
599599
click.echo(f"⚠️ Formatter not found: {formatter}, please ensure it is installed")
600600
codeflash_section["formatter-cmds"] = formatter_cmds
601601
# Add the 'codeflash' section, ensuring 'tool' section exists

0 commit comments

Comments
 (0)