Skip to content

Commit

Permalink
fix: update pkg patch
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalygashkov committed Jun 25, 2024
1 parent 0e30b33 commit 35a8ad4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions patches/@yao-pkg+pkg+5.12.0.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
diff --git a/node_modules/@yao-pkg/pkg/prelude/bootstrap.js b/node_modules/@yao-pkg/pkg/prelude/bootstrap.js
index fa65407..3f0e9f6 100644
index fa65407..42d1aa1 100644
--- a/node_modules/@yao-pkg/pkg/prelude/bootstrap.js
+++ b/node_modules/@yao-pkg/pkg/prelude/bootstrap.js
@@ -2239,6 +2239,11 @@ function payloadFileSync(pointer) {
@@ -2239,6 +2239,15 @@ function payloadFileSync(pointer) {
} else {
const tmpModulePath = path.join(tmpFolder, moduleBaseName);

+ // here we copy all files from the snapshot module folder to temporary folder
+ // we keep the module folder structure to prevent issues with modules that are statically
+ // linked using relative paths
+ copyFolderRecursiveSync(moduleFolder, tmpFolder);
+ for (const file of fs.readdirSync(moduleFolder)) {
+ const src = path.join(moduleFolder, file);
+ const dest = path.join(tmpFolder, file);
+ fs.copyFileSync(src, dest)
+ }
+
if (!fs.existsSync(tmpModulePath)) {
fs.copyFileSync(modulePath, tmpModulePath);
Expand Down

0 comments on commit 35a8ad4

Please sign in to comment.