Skip to content

fix: preserve zip modes when packing on Windows#254

Open
he-yufeng wants to merge 1 commit into
modelcontextprotocol:mainfrom
he-yufeng:fix/windows-pack-zip-permissions
Open

fix: preserve zip modes when packing on Windows#254
he-yufeng wants to merge 1 commit into
modelcontextprotocol:mainfrom
he-yufeng:fix/windows-pack-zip-permissions

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

Fixes #235.

mcpb pack already collects each file's mode, but the packing path only wrote ZIP Unix external attributes on non-Windows platforms. A bundle built on Windows therefore lost the mode metadata needed when it was later unpacked on Linux or macOS.

This writes Unix mode attributes on every platform. Binary entry points still get execute bits added before the mode is stored, so Windows-built binary bundles preserve the same cross-platform behavior as Unix-built bundles.

To verify

  • yarn test test/cli.test.ts --runInBand
  • yarn lint
  • yarn build
  • git diff --check

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.

mcpb pack on Windows produces .mcpb without Unix file permissions

1 participant