Skip to content

fix: preserve pnpm @img path before dereferencing sharp#330

Merged
lefarcen merged 3 commits intomainfrom
fix/desktop-ci-sharp-symlink
Mar 22, 2026
Merged

fix: preserve pnpm @img path before dereferencing sharp#330
lefarcen merged 3 commits intomainfrom
fix/desktop-ci-sharp-symlink

Conversation

@mrcfps
Copy link
Copy Markdown
Contributor

@mrcfps mrcfps commented Mar 22, 2026

Summary

  • preserve sharp's original pnpm realpath before replacing the workspace symlink
  • copy @img from the saved pnpm location so electron-builder bundles real files instead of broken symlinks
  • keep the desktop mac dist script lint-clean while leaving unrelated lockfile changes out of this PR

Verification

  • node --check apps/desktop/scripts/dist-mac.mjs
  • pnpm lint
  • pnpm test

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@lefarcen lefarcen merged commit ed291c6 into main Mar 22, 2026
8 checks passed
@mrcfps mrcfps deleted the fix/desktop-ci-sharp-symlink branch March 22, 2026 10:20
lefarcen added a commit that referenced this pull request Mar 22, 2026


Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
lefarcen added a commit that referenced this pull request Mar 22, 2026
)

* fix: stabilize openclaw-weixin plugin entry config

* fix(desktop): dereference pnpm symlinks before electron-builder

pnpm creates symlinks in node_modules pointing to .pnpm directory.
When electron-builder copies these as extraResources, the symlinks
point to non-existent paths in the final .app bundle, causing
codesign to fail with "invalid destination for symbolic link".

This fix dereferences node_modules/sharp and node_modules/@img
symlinks before running electron-builder.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* style: format dist-mac.mjs

* fix(desktop): copy @img from sharp's node_modules for pnpm

* fix(desktop): find @img as sibling of sharp in pnpm structure

* fix(desktop): resolve pnpm paths before dereferencing

* fix(desktop): use cp -RL for full symlink dereference in pnpm deps

Node.js fs.cp with dereference:true only dereferences the top-level
source path, not nested symlinks inside directories. The @img package
contains symlinks to other pnpm packages that were not being resolved.

Switch to cp -RL shell command which properly resolves all nested
symlinks recursively.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* debug: add symlink detection after dereference

* fix(desktop): dereference ALL pnpm symlinks before electron-builder

Previous fix only handled sharp and @img, but pnpm creates symlinks
for all dependencies. Now we find and dereference all symlinks in
node_modules before electron-builder runs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(desktop): isolate sidecar patching and refresh model inventory

* revert: remove redundant symlink fix, use upstream solution from PR #330

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* revert: restore package-lock.json to main

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants