installed pty
[VSoRC/.git] / node_modules / node-pty / scripts / install.js
diff --git a/node_modules/node-pty/scripts/install.js b/node_modules/node-pty/scripts/install.js
new file mode 100644 (file)
index 0000000..d88b7f1
--- /dev/null
@@ -0,0 +1,18 @@
+'use strict'
+
+const os = require('os');
+const path = require('path');
+const spawn = require('child_process').spawn;
+
+const gypArgs = ['rebuild'];
+if (process.env.NODE_PTY_DEBUG) {
+  gypArgs.push('--debug');
+}
+const gypProcess = spawn(os.platform() === 'win32' ? 'node-gyp.cmd' : 'node-gyp', gypArgs, {
+  cwd: path.join(__dirname, '..'),
+  stdio: 'inherit'
+});
+
+gypProcess.on('exit', function (code) {
+  process.exit(code);
+});