Skip to content

fix: quote exclusion patterns in make package / sync-svn - #7

Merged
bornmw merged 1 commit into
mainfrom
fix/make-exclude-quoting
Sep 3, 2026
Merged

bornmw merged 1 commit into
mainfrom
fix/make-exclude-quoting

Conversation

@bornmw

@bornmw bornmw commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Shipped bug from #3 (A5, unified excludes): the exclusion patterns were stored in make variables with \" escaping, which make passes to the shell literally — the shell then treats \"pat\" as a quoted literal quote character, so zip received patterns like "node_modules/*" (with the quote marks) that match nothing.

Result: make package produced a 482 MB / 20,883-file dist/cardea.zip (full .playwright-browsers/, node_modules/, … included) instead of the ~25 KB / 14-entry plugin zip. Nobody hit it before because make package hadn't run since #3 merged (1.0.1 was packaged with the pre-A5 Makefile).

Fix: use plain shell quotes (make passes them through; the shell strips them), and quote the rsync --exclude= patterns too so the shell can't glob-expand *.git* / composer.* / package*.json before rsync sees them:

ZIP_EXCLUDES   := $(foreach entry,$(EXCLUDE_DIRS),"$(entry)/*") ... 
RSYNC_EXCLUDES := $(foreach entry,$(EXCLUDE_DIRS),"--exclude=$(entry)/") ...

Verified:

  • make -n package / make -n sync-svn — patterns arrive shell-quoted as intended
  • make packagedist/cardea.zip is 25,509 bytes / 14 entries (LICENSE, cardea.php, readme.txt, uninstall.php, includes/.php, assets/js/.php+js, languages/), cardea.php inside is 1.0.2

Package/SVN release contents are not affected by the bug (the Makefile is excluded from both; the plugin files themselves were never wrong) — this unblocks the correct make package / make sync-svn for the 1.0.2 WordPress.org release.

@bornmw
bornmw merged commit d03e8e0 into main Sep 3, 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.

1 participant