Skip to content

Commit

Permalink
more debuggable output
Browse files Browse the repository at this point in the history
  • Loading branch information
refack committed Feb 24, 2017
1 parent d44e5b9 commit e552dbf
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 @@ -16,6 +16,7 @@
"author": "Fedor Indutny <fedor@indutny.com>",
"license": "MIT",
"devDependencies": {
"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 e552dbf

Please sign in to comment.