Skip to content

Commit ea688f3

Browse files
mrbrandaoclaude
andcommitted
fix: allow interactive input in install hook scripts
Connect stdin/stdout/stderr to terminal so scripts can prompt for user input and display output in real-time. Remove capture_output=True which was blocking interactive prompts. Fixes issue where scripts using read -rp or other interactive commands didn't show prompts to the user. Related to #37 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent e62a87b commit ea688f3

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/lola/targets/install.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,20 +87,16 @@ def _run_install_hook(
8787
["bash", str(full_script_path)],
8888
cwd=project_path,
8989
env=env,
90-
capture_output=True,
9190
text=True,
9291
timeout=300,
9392
)
9493

95-
if result.stdout:
96-
console.print(result.stdout)
97-
9894
if result.returncode != 0:
99-
error_msg = f"{hook_type} script failed (exit code {result.returncode})"
100-
if result.stderr:
101-
console.print(f"[red]{result.stderr}[/red]")
102-
error_msg += f": {result.stderr[:200]}"
103-
raise InstallationError(module.name, assistant, error_msg)
95+
raise InstallationError(
96+
module.name,
97+
assistant,
98+
f"{hook_type} script failed (exit code {result.returncode})",
99+
)
104100

105101
except subprocess.TimeoutExpired:
106102
raise InstallationError(

0 commit comments

Comments
 (0)