Closed StefanNienhuis closed 2 years ago
Actually, using 755
doesn't work, it just resets the permissions to default. Looking at adm-zip issues, it seems to be a mess and their versioning is not using semver properly. I propose replacing adm-zip with another zip library. I'll make a PR soon.
Apparently there are no proper synchronous zip libraries, so I started looking into fixing adm-zip. It turns out that the attribute parameter should be an octal number 0o755
instead of hex 0x755
. Using octal numbers results in the correct number. I'll create a PR now.
🐛 Bug description
PR #103 changed the file permissions for the ZIP in local builds from
755
to0x755 << 16
, in response to issue #102. Not sure what's going on here, but having0x755 << 16
actually breaks the permissions (---------
permissions) on my machine (M1 Pro, macOS 12.0.1). Whereas the original,755
, does work. I'm extracting it with the native macOS Archive Utility and I've also tried the Node.js libraryjszip
.🤔 Expected Behavior
I expected the file permissions to be correct (755) on extraction of the zip file.
👟 Steps to reproduce
serverless package
🌍 Your environment
macOS 12.0.1 M1 Pro (ARM)
serverless version: 2.71.0
rust-plugin version:
master
branch