mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Make meteor shell not crash when piped from another command.
This commit makes possible but but doesn't fully solve the problem of using `meteor shell` within shell scripts. See #5055 for more details. Closes #5056
This commit is contained in:
@@ -230,6 +230,8 @@
|
||||
|
||||
### `meteor` command-line tool
|
||||
|
||||
* `meteor shell` no longer crashes when piped from another command.
|
||||
|
||||
* Avoid a race condition in `meteor --test` and work with newer versions of the
|
||||
Velocity package. #3957
|
||||
|
||||
|
||||
@@ -103,7 +103,9 @@ Cp.setUpSocket = function setUpSocket(sock, key) {
|
||||
|
||||
process.stderr.write(shellBanner());
|
||||
process.stdin.pipe(sock);
|
||||
process.stdin.setRawMode(true);
|
||||
if (process.stdin.setRawMode) { // https://github.com/joyent/node/issues/8204
|
||||
process.stdin.setRawMode(true);
|
||||
}
|
||||
}
|
||||
|
||||
function onClose() {
|
||||
@@ -125,7 +127,9 @@ Cp.setUpSocket = function setUpSocket(sock, key) {
|
||||
|
||||
function tearDown() {
|
||||
self.connected = false;
|
||||
process.stdin.setRawMode(false);
|
||||
if (process.stdin.setRawMode) { // https://github.com/joyent/node/issues/8204
|
||||
process.stdin.setRawMode(false);
|
||||
}
|
||||
process.stdin.unpipe(sock);
|
||||
sock.unpipe(process.stdout);
|
||||
sock.removeListener("connect", onConnect);
|
||||
|
||||
Reference in New Issue
Block a user