Skip to content

fix(cli): catch output directory creation errors in render#128

Closed
miguel-heygen wants to merge 1 commit into03-29-fix_cli_distinguish_info_vs_warning_severity_in_lint_outputfrom
03-29-fix_cli_catch_output_directory_creation_errors_in_render
Closed

fix(cli): catch output directory creation errors in render#128
miguel-heygen wants to merge 1 commit into03-29-fix_cli_distinguish_info_vs_warning_severity_in_lint_outputfrom
03-29-fix_cli_catch_output_directory_creation_errors_in_render

Conversation

@miguel-heygen
Copy link
Copy Markdown
Collaborator

@miguel-heygen miguel-heygen commented Mar 29, 2026

PR Stack

# PR Status
1 #122 — fix: info width/height swap ← base
2 #123 — fix: include all 9 templates in build
3 #124 — fix: suppress ANSI in non-TTY
4 #125 — fix: lint --json error paths
5 #126 — fix: separate info/warning counts
6 #127 — fix: lint severity display
7 #128 — fix: render output path error
8 #129 — fix: zero-duration error message ← top

Summary

  • mkdirSync for the render output path was not wrapped in try-catch
  • When the path was invalid or permissions were denied, Node.js threw a raw EACCES error with full stack trace
  • Now catches the error and displays a clean error box via the existing errorBox helper

Reproducer

npx hyperframes render --output /root/nope/output.mp4
# Was: raw "Error: EACCES: permission denied, mkdir '/root/nope'"
#   at Object.mkdirSync (node:fs:1379:3)
#   at ...12 lines of stack trace...
# Now: "Cannot create output directory: /root/nope — permission denied"

Stack

7/8 — Depends on #127

🤖 Generated with Claude Code

mkdirSync for the render output path was not wrapped in try-catch,
exposing a raw Node.js EACCES stack trace when the path was invalid
or permissions were denied.

Reproducer:
  npx hyperframes render --output /root/nope/output.mp4
  # Was: raw "Error: EACCES: permission denied" with stack trace
  # Now: clean "Cannot create output directory" error box
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.

1 participant