mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Make sure meteor shell options JSON is parsed separately.
Also don't ignore the `error` parameter passed to the readJSONFromStream callback function. Fixes #7312.
This commit is contained in:
@@ -134,7 +134,7 @@ Cp.setUpSocket = function setUpSocket(sock, key) {
|
||||
sock.write(JSON.stringify({
|
||||
terminal: ! process.env.EMACS,
|
||||
key: key
|
||||
}));
|
||||
}) + "\n");
|
||||
|
||||
process.stderr.write(shellBanner());
|
||||
process.stdin.pipe(sock);
|
||||
|
||||
@@ -161,6 +161,12 @@ Sp.onConnection = function onConnection(socket) {
|
||||
readJSONFromStream(socket, function (error, options, replInputSocket) {
|
||||
clearTimeout(timeout);
|
||||
|
||||
if (error) {
|
||||
socket = null;
|
||||
console.error(error.stack);
|
||||
return;
|
||||
}
|
||||
|
||||
if (options.key !== self.key) {
|
||||
if (socket) {
|
||||
socket.end(EXITING_MESSAGE + "\n");
|
||||
|
||||
Reference in New Issue
Block a user