3 const os = require('os');
4 const path = require('path');
5 const spawn = require('child_process').spawn;
7 const gypArgs = ['rebuild'];
8 if (process.env.NODE_PTY_DEBUG) {
9 gypArgs.push('--debug');
11 const gypProcess = spawn(os.platform() === 'win32' ? 'node-gyp.cmd' : 'node-gyp', gypArgs, {
12 cwd: path.join(__dirname, '..'),
16 gypProcess.on('exit', function (code) {