Skip to content

Commit

Permalink
more debuggable output
Browse files Browse the repository at this point in the history
  • Loading branch information
refack committed Mar 17, 2017
1 parent 2355e19 commit 3882480
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"babel-cli": "^6.10.1",
"babel-preset-env": "^1.2.2",
"babel-register": "^6.9.0",
"debug": "^2.6.1",
"eslint": "^2.12.0",
"mocha": "^2.5.3",
"ninja.js": "^1.1.0",
Expand Down
3 changes: 3 additions & 0 deletions test/gyppies-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const path = require('path');
const rimraf = require('rimraf');
const ninja = require('ninja.js');
const spawnSync = require('child_process').spawnSync;
const debug = require('debug')('gyp.js');

const rootDir = path.join(__dirname, '..');
const gyp = path.join(rootDir, 'bin', 'gyp');
Expand Down Expand Up @@ -35,9 +36,11 @@ function build(name) {
if (process.env.running_under_istanbul)
argv = istanbulArgs.concat(argv);

debug({execPath: process.execPath, argv, spawnOpts});
let p = spawnSync(process.execPath, argv, spawnOpts);
if (p.status !== 0 && p.stdout)
console.error(p.stdout.toString());
debug(p.stdout.toString());
if (p.error)
throw p.error;
assert.equal(p.status, 0, `cd ${name} && gyp failed`);
Expand Down

0 comments on commit 3882480

Please sign in to comment.