Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit 589c6a5

Browse files
committedMay 8, 2019
bootstrap.js: don't check PKG_DUMMY_ENTRYPOINT in worker threads
1 parent 58f81cf commit 589c6a5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
 

‎prelude/bootstrap.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ if (process.env.PKG_EXECPATH === 'PKG_INVOKE_NODEJS') {
4545
return { undoPatch: true };
4646
}
4747

48-
if (process.argv[1] !== 'PKG_DUMMY_ENTRYPOINT') {
49-
// expand once patchless is introduced, that
50-
// will obviously lack any work in node_main.cc
51-
throw new Error('PKG_DUMMY_ENTRYPOINT EXPECTED');
48+
if (NODE_VERSION_MAJOR < 12 || require('worker_threads').isMainThread) {
49+
if (process.argv[1] !== 'PKG_DUMMY_ENTRYPOINT') {
50+
// expand once patchless is introduced, that
51+
// will obviously lack any work in node_main.cc
52+
throw new Error('PKG_DUMMY_ENTRYPOINT EXPECTED');
53+
}
5254
}
5355

5456
if (process.env.PKG_EXECPATH === EXECPATH) {

0 commit comments

Comments
 (0)
This repository has been archived.