Skip to content

Commit afd98c9

Browse files
authored
fix: check and or create path dir if does not exist for prompt file (#214)
# Motivation <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [ ] I have updated the documentation or added new documentation as needed - [ ] I have read and agree to the [Contributor License Agreement](/codegen-sh/codegen-sdk/blob/develop/CLA.md)
1 parent 797ebf5 commit afd98c9

File tree

1 file changed

+1
-0
lines changed
  • src/codegen/cli/commands/create

1 file changed

+1
-0
lines changed

src/codegen/cli/commands/create/main.py

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def create_command(session: CodegenSession, name: str, path: Path, description:
9393
with create_spinner("Generating function (using LLM, this will take ~10s)") as status:
9494
response = RestAPI(session.token).create(name=name, query=description)
9595
code = convert_to_cli(response.code, session.language, name)
96+
prompt_path.parent.mkdir(parents=True, exist_ok=True)
9697
prompt_path.write_text(response.context)
9798
else:
9899
# Use default implementation

0 commit comments

Comments
 (0)