This commit is contained in:
Cody Peter Mello
2017-06-13 00:28:13 +00:00
parent c3d7f31d10
commit 7ab84e1aa2
3 changed files with 17 additions and 25 deletions
+3
View File
@@ -3,6 +3,9 @@ dtrace-provider - Changes
## HISTORY
* 0.8.3:
Install fails with yarn
* 0.8.2:
Error installing in 64-bit SmartOS zones with 32-bit node
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "dtrace-provider",
"version": "0.8.2",
"version": "0.8.3",
"description": "Native DTrace providers for node.js applications",
"keywords": [
"dtrace",
+13 -24
View File
@@ -15,41 +15,30 @@ fs.renameSync(src, dst);
movedFile = true;
//npm_execpath: '/usr/local/lib/node_modules/npm/bin/npm-cli.js',
var nodegyp = path.join(process.env.npm_execpath,
'..',
'node-gyp-bin',
'node-gyp');
if (!fs.existsSync(nodegyp))
nodegyp = path.join(process.execPath,
'..',
'..',
'lib',
'node_modules',
'npm',
'bin',
'node-gyp-bin',
'node-gyp');
if (!fs.existsSync(nodegyp)) {
console.error('cannot locate npm install');
return;
}
var spawn = require('child_process').spawn;
var stdio = 'ignore';
if (process.env.V)
if (process.env.V) {
stdio = 'inherit';
}
var options = {
cwd: path.join(__dirname, '..'),
stdio: stdio
};
var child = spawn(nodegyp, ['rebuild'], options);
var child = spawn('node-gyp', [ 'rebuild' ], options);
child.on('error', function (err) {
if (err.code === 'ENOENT') {
console.error('cannot locate node-gyp');
} else {
console.error(err);
}
process.exit(0);
});
child.on('close', function(code, signal) {
if ((code || signal) && process.env.V === undefined) {