Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit 6d61d4b

Browse files
committed
Call npm script instead of node-gyp directly
1 parent dbeb699 commit 6d61d4b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

install/install.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,9 @@ process.env['OPENCV4NODEJS_DEFINES'] = defines.join('\n')
9292
process.env['OPENCV4NODEJS_INCLUDES'] = includes.join('\n')
9393
process.env['OPENCV4NODEJS_LIBRARIES'] = libs.join('\n')
9494

95-
const flags = process.env.BINDINGS_DEBUG ? '--jobs max --debug' : '--jobs max'
96-
const nodegypCmd = 'node-gyp rebuild ' + flags
97-
log.info('install', `spawning node gyp process: ${nodegypCmd}`)
98-
const child = child_process.exec(nodegypCmd, {
95+
const buildCmd = process.env.BINDINGS_DEBUG ? 'npm run rebuild -- --debug' : 'npm run rebuild';
96+
log.info('install', `spawning process: ${buildCmd}`)
97+
const child = child_process.exec(buildCmd, {
9998
maxBuffer: 1024 * 1024 * 10
10099
}, function(err, stdout, stderr) {
101100
const _err = err || stderr

0 commit comments

Comments
 (0)