Skip to content

Commit 5db6dba

Browse files
authored
Update cmd_init.py
better exception handling
1 parent 0b86128 commit 5db6dba

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)