From dd0b96a9438f9c068c85f4ed88a5dc6709577855 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 14 Dec 2018 17:43:18 +0000 Subject: [PATCH] fix: `rs` in node@11 (#1493) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes node 11's `rs` support. Somehow required that the `process.stdin` to be disconnected from the child before the stream is resumed (whereas previously it seemed that it would automatically happen…possibly a node 11 bug). Fixes #1493 --- .travis.yml | 3 ++- lib/monitor/run.js | 4 ++++ package-lock.json | 8 ++++---- package.json | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index a4a7dcdc..b6b03bd3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,8 @@ cache: notifications: email: false node_js: - - '9' + - '11' + - '10' - '8' - '6' - '4' diff --git a/lib/monitor/run.js b/lib/monitor/run.js index 8a1033dd..e316c2b1 100644 --- a/lib/monitor/run.js +++ b/lib/monitor/run.js @@ -151,6 +151,10 @@ function run(options) { }); child.on('exit', function (code, signal) { + if (child && child.stdin) { + process.stdin.unpipe(child.stdin); + } + if (code === 127) { utils.log.error('failed to start process, "' + cmd.executable + '" exec not found'); diff --git a/package-lock.json b/package-lock.json index 7a14faf5..dbaa9965 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2367,7 +2367,7 @@ }, "got": { "version": "6.7.1", - "resolved": "http://registry.npmjs.org/got/-/got-6.7.1.tgz", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "requires": { "create-error-class": "^3.0.0", @@ -4369,9 +4369,9 @@ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, "pstree.remy": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.3.tgz", - "integrity": "sha512-tGkOSvpMp0j7hskA4izvP0onujJSEAYO0SViHtjJX5a+4cqxVXiq32opahQO4HkA7bnHsRk9xgrf6LVvG/Q9UA==" + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.6.tgz", + "integrity": "sha512-NdF35+QsqD7EgNEI5mkI/X+UwaxVEbQaz9f4IooEmMUv6ZPmlTQYGjBPJGgrlzNdjSvIy4MWMg6Q6vCgBO2K+w==" }, "punycode": { "version": "1.4.1", diff --git a/package.json b/package.json index 59f2cd6a..11bcdae6 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "debug": "^3.1.0", "ignore-by-default": "^1.0.1", "minimatch": "^3.0.4", - "pstree.remy": "^1.1.3", + "pstree.remy": "^1.1.6", "semver": "^5.5.0", "supports-color": "^5.2.0", "touch": "^3.1.0",