From cadea6223a1811be9df0937d37852769a54baf51 Mon Sep 17 00:00:00 2001 From: Ashley Gibson Date: Wed, 10 Jun 2026 10:38:06 +0100 Subject: [PATCH] Fix zip corruption in pre command output 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 --- tasks/copy.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/copy.js b/tasks/copy.js index b391293..c5f291a 100644 --- a/tasks/copy.js +++ b/tasks/copy.js @@ -174,10 +174,12 @@ const copyPrereleaseTask = (done) => { const filter = gulpFilter([`**/${filename}.txt`], { restore: true }) + // encoding: false is required so the zip isn't corrupted by utf-8 round-tripping + // @link https://github.com/gulpjs/gulp/issues/2790 return gulp.src([ `${sake.config.paths.build}/${sake.config.plugin.id}*.zip`, `${sake.config.paths.build}/${sake.config.plugin.id}/${filename}.txt` - ]).pipe(filter) + ], { encoding: false }).pipe(filter) .pipe(rename({ prefix: sake.config.plugin.id + '_' })) .pipe(filter.restore) .pipe(gulp.dest(sake.getPrereleasesPath()))