Skip to content

Commit

Permalink
test: update
Browse files Browse the repository at this point in the history
  • Loading branch information
aryamohanan committed Aug 13, 2024
1 parent ee049f4 commit 35be99a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/shared-metrics/src/util/nativeModuleRetry.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ function copyPrecompiled(opts, loaderEmitter, callback) {
const targetDir = path.join(opts.nativeModulePath, 'precompiled');

fse
.copy(path.join(os.tmpdir(), opts.nativeModuleName), targetDir)
.copy(path.join(os.tmpdir(), opts.nativeModuleName), targetDir, { dereference: true })
.then(() => {
// We have unpacked and copied the correct precompiled native addon. The next attempt to require the
// dependency should work.
Expand All @@ -198,6 +198,7 @@ function copyPrecompiled(opts, loaderEmitter, callback) {
// it will remember and not try to load anything from that path again (a `false` will be
// put into the cache for that cache key). Instead, we force a new path, by adding precompiled
// to the module path and use the absolute path to the module to load it.
logger.debug(`Copying the precompiled build for ${opts.nativeModuleName} ${label} successful.`);
opts.loadFrom = targetDir;
callback(true);
})
Expand Down

0 comments on commit 35be99a

Please sign in to comment.