Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
nx-cdk: patch
---

Fix the generated workspace pre-commit hook so it works on macOS. BSD `paste` requires an explicit stdin operand, so the hook silently skipped lint, type-check and tests on macOS.

Existing workspaces need the same edit applied by hand: in `.git-hooks/pre-commit`, change `paste -sd,` to `paste -sd, -`.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ EXCLUDED_FILES_REGEX+='|.*\/step-functions\/.*\.(yml|yaml)$' # Ignore step funct
EXCLUDED_FILES_REGEX+='|^\/?([^\/]*)$' # Ignore all root-level files
AFFECTED_FILES=$(echo "$STAGED_FILES" | \
grep -vE "$EXCLUDED_FILES_REGEX" | \
paste -sd,)
paste -sd, -)

echo -e "${GREEN}\nAffected files: $AFFECTED_FILES\n${NO_COLOUR}"

Expand Down