Skip to content

Commit

Permalink
fix: enable dereference when copying module to tmp dir (#4030)
Browse files Browse the repository at this point in the history
When executing the copy command, for symlinked node_modules like in the case of pnpm, the copy will treat nested folders as files which breaks the pack command. De-referencing will make sure any symlinked folders are actually dereferenced.

---

By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
  • Loading branch information
agdimech authored Apr 3, 2023
1 parent ac7cc01 commit e00102b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jsii-pacmak/lib/packaging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ export class JsiiModule {
args.push('--loglevel=verbose');
}
} else {
// Ensure module is copied to tmpdir to ensure parallel execution does not content on generated tarballs
await fs.copy(this.moduleDirectory, tmpdir);
// Ensure module is copied to tmpdir to ensure parallel execution does not contend on generated tarballs
await fs.copy(this.moduleDirectory, tmpdir, { dereference: true });
}

const out = await shell(packCommand, args, {
Expand Down

0 comments on commit e00102b

Please sign in to comment.