Skip to content

feat: add option to print post-hook stdout#122

Merged
aliev merged 3 commits intomainfrom
feat/post-hook-print-stdout
Mar 1, 2026
Merged

feat: add option to print post-hook stdout#122
aliev merged 3 commits intomainfrom
feat/post-hook-print-stdout

Conversation

@aliev
Copy link
Owner

@aliev aliev commented Mar 1, 2026

Why

Post-hook scripts often print important next steps (for example, setup commands or onboarding notes).

Today that output is mostly hidden in debug logs, so users can complete generation but still miss required actions.

Intent

Make post-generation guidance visible only when template authors explicitly want it.

Constraints

  • Keep default behavior unchanged.
  • Keep visibility opt-in to avoid noisy CI output.
  • Do not change pre-hook stdout behavior, because it is used as an answers input channel.

Risk

If enabled, anything printed by the hook becomes visible in terminal/CI logs, so templates should avoid printing secrets.

@aliev aliev requested a review from dinosath March 1, 2026 16:22
aliev added 2 commits March 1, 2026 23:03
Instead of capturing stdout into a buffer and printing it after the hook
finishes, inherit stdout directly when post_hook_print_stdout is true.
This ensures hook output (e.g. progress messages before uv sync) appears
in the correct order relative to subprocess stderr output.
@aliev aliev merged commit 7db0e7b into main Mar 1, 2026
9 checks passed
@aliev aliev deleted the feat/post-hook-print-stdout branch March 1, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants