Extension push includes macOS ._* resource fork files in archive
Opened by swampadmin · 1/1/2025
Description
When pushing an extension from macOS, the tar.gz archive includes macOS AppleDouble resource fork files (._* prefix) alongside every model file. When pulling the extension on Linux, the pull command rejects these as "Hidden files are not allowed in extensions."
Steps to Reproduce
- On macOS, create an extension with model files in
extensions/models/ - Push:
swamp extension push extension.yaml - On Linux, pull:
swamp extension pull @namespace/extension
Actual Behavior
Pull fails with safety errors for every ._*.ts file:
"Hidden files are not allowed in extensions."Files like ._node.ts, ._ingress.ts, ._event.ts, .__helpers.ts, etc. are present in the archive.
Expected Behavior
The push command should exclude macOS resource fork files (._*) from the archive, or the pull command should silently skip them during extraction.
Likely Cause
macOS's tar (or the archiving library used by swamp) automatically includes AppleDouble ._* files that store extended attributes and resource forks. The fix is one of:
- Set
COPYFILE_DISABLE=1environment variable when creating the tar archive on macOS - Filter out files matching
._*pattern during archive creation - Filter out
._*files during pull extraction (before safety checks)
Environment
- Push from: macOS (Darwin 22.6.0)
- Pull on: Linux (Docker container)
- swamp version: 20260227.010040.0-sha.9cd80fb4
Closed
No activity in this phase yet.
Sign in to post a ripple.