Skip to content

Visual Studio Code, rebuilt in Rust

Rust

fix(release): zip the macOS app without AppleDouble files (#36)

Artur Rok6a1948e0fc54
diff --git a/port/tools/package-app b/port/tools/package-app
index 835f8de0a9b..5751c8a60a3 100755
--- a/port/tools/package-app
+++ b/port/tools/package-app
@@ -170,7 +170,12 @@ console.log(verify.stderr.toString().trim());
if (verify.exitCode === 0) {
const zip = join(dirname(out), `VSRustium-${displayVersion(product)}-${platform}-${arch}.zip`);
rmSync(zip, { force: true });
- await Bun.$`ditto -c -k --keepParent ${out} ${zip}`;
+ // Without --norsrc --noextattr ditto stores each file's xattrs as `._` files inside the app; unzippers other than
+ // Archive Utility write them out and break the seal: "VSRustium is damaged" (issue 29).
+ await Bun.$`ditto -c -k --norsrc --noextattr --keepParent ${out} ${zip}`;
+ if ((await Bun.$`zipinfo -1 ${zip}`.text()).split('\n').some((entry) => entry.split('/').at(-1)!.startsWith('._'))) {
+ throw new Error(`${zip} holds AppleDouble ._ files`);
+ }
await writeFeedEntries(zip, product, platform, arch);
}
const size = (await Bun.$`du -sh ${out}`.text()).split('\t')[0];