History

fix(desktop): mac start:desktop crash from rewritten framework symlinks (#3058)

Icarus Wings committed 5 months agov0.0.28-nightly.20260614.557

Commit a23b8331 parent ce905631 file · +6 −2Browse files

Unified · Split

apps/desktop/scripts/electron-launcher.mjs+6−2
@@ -30,7 +30,7 @@ export const APP_BUNDLE_ID = isDevelopment · 29 unmodified lines
3030 ? `com.t3tools.t3code.dev.${devBundleIdSuffix || "local"}`
3131 : "com.t3tools.t3code";
3232 const APP_PROTOCOL_SCHEMES = isDevelopment ? ["t3code-dev"] : ["t3code"];
33−const LAUNCHER_VERSION = 10;
33+const LAUNCHER_VERSION = 11;
3434 const defaultIconPath = join(desktopDir, "resources", "icon.icns");
3535 const developmentMacIconPngPath = join(repoRoot, "assets", "dev", "blueprint-macos-1024.png");
3636
@@ -295,7 +295,11 @@ function buildMacLauncher(electronBinaryPath) { · 258 unmodified lines
295295 }
296296
297297 rmSync(targetAppBundlePath, { recursive: true, force: true });
298− cpSync(sourceAppBundlePath, targetAppBundlePath, { recursive: true });
298+ // verbatimSymlinks keeps the framework's relative symlinks intact
299+ // (e.g. Resources -> Versions/Current/Resources). Without it cpSync
300+ // rewrites them to absolute paths into node_modules, which escape the
301+ // bundle and crash sandboxed helper processes (icudtl.dat not found).
302+ cpSync(sourceAppBundlePath, targetAppBundlePath, { recursive: true, verbatimSymlinks: true });
299303 patchMainBundleInfoPlist(targetAppBundlePath, iconPath);
300304 patchHelperBundleInfoPlists(targetAppBundlePath);
301305 if (isDevelopment) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t