chore: change remaining usages of process.mainModule
(#38705)
This commit is contained in:
parent
ab49e98401
commit
f5869b6fb9
6 changed files with 6 additions and 6 deletions
|
@ -9,7 +9,7 @@ const NPX_CMD = process.platform === 'win32' ? 'npx.cmd' : 'npx';
|
|||
const utils = require('./lib/utils');
|
||||
const { YARN_VERSION } = require('./yarn');
|
||||
|
||||
if (!process.mainModule) {
|
||||
if (!require.main) {
|
||||
throw new Error('Must call the nan spec runner directly');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue