app-builder icon indicating copy to clipboard operation
app-builder copied to clipboard

Make symlink behavior configurable

Open mat-sz opened this issue 4 months ago • 9 comments

Symlink resolution behavior introduced in 189519a8292f939d9e5d3b47c6407444fee70334 breaks yarn workspaces.

Yarn tends to symlink things around when it comes to workspaces, so using any version after v5.0.0-alpha.3 results in an error similar to this (from electron-builder):

  ⨯ Path does not end with the package name  failedTask=build stackTrace=Error: Path does not end with the package name
    at getRealSource (/metastable/node_modules/app-builder-lib/src/util/appFileCopier.ts:194:13)
    at computeNodeModuleFileSets (/metastable/node_modules/app-builder-lib/src/util/appFileCopier.ts:225:24)
    at /metastable/node_modules/app-builder-lib/src/platformPackager.ts:401:34
    at async Promise.all (index 0)
    at AsyncTaskManager.awaitTasks (/metastable/node_modules/builder-util/src/asyncTaskManager.ts:65:25)
    at LinuxPackager.doPack (/metastable/node_modules/app-builder-lib/src/platformPackager.ts:293:5)
    at LinuxPackager.pack (/metastable/node_modules/app-builder-lib/src/platformPackager.ts:138:5)
    at Packager.doBuild (/metastable/node_modules/app-builder-lib/src/packager.ts:459:9)
    at executeFinally (/metastable/node_modules/builder-util/src/promise.ts:12:14)
    at Packager.build (/metastable/node_modules/app-builder-lib/src/packager.ts:393:31)
    at executeFinally (/metastable/node_modules/builder-util/src/promise.ts:12:14)

Reverting that change and rebuilding app-builder resolves those issues.

I can provide a minimal example if needed.

mat-sz avatar Oct 05 '24 13:10 mat-sz