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

Commit

Permalink
bootstrap.js: don't check PKG_DUMMY_ENTRYPOINT in worker threads
Browse files Browse the repository at this point in the history
  • Loading branch information
igorklopov committed May 8, 2019
1 parent 58f81cf commit 589c6a5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions prelude/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ if (process.env.PKG_EXECPATH === 'PKG_INVOKE_NODEJS') {
return { undoPatch: true };
}

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

if (process.env.PKG_EXECPATH === EXECPATH) {
Expand Down

0 comments on commit 589c6a5

Please sign in to comment.