mirror of
https://github.com/hanzoai/node-dtrace-provider.git
synced 2026-09-23 23:48:45 +00:00
chrisa/node-dtrace-provider#95 Install fails with yarn
This commit is contained in:
@@ -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
@@ -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
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user