mirror of
https://github.com/napi-rs/napi-rs.git
synced 2025-12-08 19:56:07 +00:00
fix(napi): do not invoke process.report on Windows (#2972)
This commit is contained in:
parent
694db41895
commit
01485ff423
@ -146,7 +146,7 @@ function requireNative() {
|
||||
}
|
||||
} else if (process.platform === 'win32') {
|
||||
if (process.arch === 'x64') {
|
||||
if (process.report?.getReport?.()?.header?.osName?.startsWith?.('MINGW')) {
|
||||
if (process.config?.variables?.shlib_suffix === 'dll.a' || process.config?.variables?.node_target_type === 'shared_library') {
|
||||
${requireTuple('win32-x64-gnu')}
|
||||
} else {
|
||||
${requireTuple('win32-x64-msvc')}
|
||||
|
||||
@ -108,7 +108,7 @@ function requireNative() {
|
||||
}
|
||||
} else if (process.platform === 'win32') {
|
||||
if (process.arch === 'x64') {
|
||||
if (process.report?.getReport?.()?.header?.osName?.startsWith?.('MINGW')) {
|
||||
if (process.config?.variables?.shlib_suffix === 'dll.a' || process.config?.variables?.node_target_type === 'shared_library') {
|
||||
try {
|
||||
return require('./example.win32-x64-gnu.node')
|
||||
} catch (e) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user