Fix zip corruption in pre command output#147
Merged
Merged
Conversation
Pass encoding: false to gulp.src in copyPrereleaseTask so the bundled zip isn't corrupted by utf-8 round-tripping when copied from build/ to the prereleases folder. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes prerelease zip corruption during the sake pre workflow by ensuring the build zip is read as binary data (Buffer) rather than being implicitly decoded/encoded as UTF-8 by gulp/vinyl-fs.
Changes:
- Update
copyPrereleaseTaskto callgulp.src(..., { encoding: false })so.zipcontents are not corrupted. - Add an inline comment referencing the gulp upstream issue explaining why
encoding: falseis required.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ajaynes-godaddy
approved these changes
Jun 10, 2026
ajaynes-godaddy
left a comment
Contributor
There was a problem hiding this comment.
QA checks out, LGTM!
Side note: I ended updating the Using-a-development-version-of-Saké wiki page after getting a refresher course for this PR. 😁
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
copyPrereleaseTaskintasks/copy.jswas reading the build zip viagulp.srcwithoutencoding: false, causing gulp 5 to round-trip the binary through utf-8 and corrupt the archive.encoding: falseflag is already applied incopyBuildTask,copyWpAssetsTask, andzipTaskfor the same reason — this bringscopyPrereleaseTaskin line.Fixes #145
Jira: MWC-19894
Test plan
sake buildthensake prein a plugin directoryPCLZIP_ERR_BAD_FORMATor unpack warnings🤖 Generated with Claude Code