From 022a433e568e8c6541ae26c0f60ba10b2ed02cb9 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Thu, 2 Apr 2020 12:06:14 +0100 Subject: [PATCH] Added debug info to controller process messages - Whenever Ghost sends a message to its controller process - Send extra debug info, so we can be sure what the Ghost process is seeing --- core/server/ghost-server.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/core/server/ghost-server.js b/core/server/ghost-server.js index be01f94aee..36c221d47b 100644 --- a/core/server/ghost-server.js +++ b/core/server/ghost-server.js @@ -25,6 +25,13 @@ function GhostServer(rootApp) { this.config = config; } +const debugInfo = { + versions: process.versions, + platform: process.platform, + arch: process.arch, + release: process.release +}; + /** * ## Public API methods * @@ -333,7 +340,8 @@ module.exports.announceServerStart = function announceServerStart() { // CASE: IPC communication to the CLI via child process. if (process.send) { process.send({ - started: true + started: true, + debug: debugInfo }); } @@ -364,7 +372,8 @@ module.exports.announceServerStopped = function announceServerStopped(error) { if (process.send) { process.send({ started: false, - error: error + error: error, + debug: debugInfo }); } @@ -372,7 +381,8 @@ module.exports.announceServerStopped = function announceServerStopped(error) { if (config.get('bootstrap-socket')) { return connectToBootstrapSocket({ started: false, - error: error + error: error, + debug: debugInfo }); }