From 86cb7b17e941ba7f4ef4843680d9bee264850f2f Mon Sep 17 00:00:00 2001 From: Dan Grebb Date: Sun, 30 Jul 2023 17:07:13 -0400 Subject: [PATCH] fix(remote): updates `child_process.exec` to include PATH and log errors (#1488) --- core/command/remote.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/command/remote.js b/core/command/remote.js index 1e0dd5f85..29adf0248 100644 --- a/core/command/remote.js +++ b/core/command/remote.js @@ -16,7 +16,11 @@ module.exports = { logger.log(`Starting remote with: ${commandStr} with env ${JSON.stringify(env)}`); - const child = exec(commandStr, {env: env}); + const child = exec(commandStr, { env: { ...env, 'PATH': process.env.PATH } }, (error) => { + if (error) { + logger.log("Error running backstop remote:", error); + } + }); child.stdout.on('data', logger.log);