Skip to content

MI-331: Fix paste usage in generated pre-commit hook for macOS - #342

Merged
kai-nguyen-aligent merged 1 commit into
mainfrom
feature/MI-331_nx-cdk_precommit_hook_macos_compat
Nov 25, 2026
Merged

kai-nguyen-aligent merged 1 commit into
mainfrom
feature/MI-331_nx-cdk_precommit_hook_macos_compat

Conversation

@toddhainsworth

Copy link
Copy Markdown
Member

Description of the proposed changes

  • Change paste -sd, to paste -sd, - in the nx-cdk preset's .git-hooks/pre-commit.template.
  • BSD paste (macOS) requires a file operand and exits with a usage error when given none. The hook captured that output into AFFECTED_FILES, which was left empty, so it hit the early exit 0 and silently skipped lint, type-check and tests on every commit.
  • The explicit - stdin operand is accepted by both BSD and GNU paste.
  • Adds a patch version plan for nx-cdk. Existing workspaces keep their generated hook and need the one-line edit applied by hand, which the plan describes.

Other solutions considered (if any)

  • tr '\n' ',' | sed 's/,$//' avoids paste entirely but is a longer pipeline for no real gain.

Notes to reviewers

  • 🛈 Toggl Code: MI-331: Code Review
  • 🛈 When you've finished leaving feedback, please add a final comment to the PR tagging the author, letting them know that you have finished leaving feedback

@kai-nguyen-aligent
kai-nguyen-aligent merged commit cf133af into main Nov 25, 2026
2 checks passed
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