From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Cheng Zhao <zcbenz@gmail.com>
Date: Tue, 4 Jun 2019 17:42:11 +0900
Subject: Inherit ELECTRON_CRASHPAD_PIPE_NAME in child process

This is required for crashReporter to work correctly in node process.

diff --git a/lib/child_process.js b/lib/child_process.js
index 2f478625c8220fc86c34876c17c8f532d88ba922..9a79e06555b6bf5d970f96bedb2c2146d2c74a48 100644
--- a/lib/child_process.js
+++ b/lib/child_process.js
@@ -107,6 +107,10 @@ function fork(modulePath /* , args, options */) {
   options.env = Object.create(options.env || process.env)
   options.env.ELECTRON_RUN_AS_NODE = 1;
 
+  if (process.platform === 'win32') {
+    options.env.ELECTRON_CRASHPAD_PIPE_NAME = process.env.ELECTRON_CRASHPAD_PIPE_NAME;
+  }
+
   if (!options.execPath && process.type && process.platform == 'darwin') {
     options.execPath = process.helperExecPath;
   }
