From d1bbd95c1c38967f045d9c51e0de478f25be3b48 Mon Sep 17 00:00:00 2001 From: Konstantin Fickel Date: Sun, 15 Feb 2026 14:43:46 +0100 Subject: [PATCH] fix: handle long/multiline prompts in _resolve_prompt Skip the file-existence check when the prompt contains newlines (can't be a filename) and catch OSError for prompts that exceed the OS path length limit. --- bulkgen/builder.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bulkgen/builder.py b/bulkgen/builder.py index b67a0a0..9005f11 100644 --- a/bulkgen/builder.py +++ b/bulkgen/builder.py @@ -57,9 +57,14 @@ class BuildResult: def _resolve_prompt(prompt_value: str, project_dir: Path) -> str: """Resolve a prompt: read from file if the path exists, otherwise use as-is.""" - candidate = project_dir / prompt_value - if candidate.is_file(): - return candidate.read_text() + if "\n" in prompt_value: + return prompt_value + try: + candidate = project_dir / prompt_value + if candidate.is_file(): + return candidate.read_text() + except OSError: + pass return prompt_value