Inherit user env in issue reporter, fixes #46914

This commit is contained in:
Rachel Macfarlane
2018-04-02 10:32:58 -07:00
parent 1289571485
commit ba0580f927
3 changed files with 12 additions and 3 deletions

View File

@@ -9,6 +9,11 @@ const path = require('path');
const fs = require('fs');
const remote = require('electron').remote;
function assign(destination, source) {
return Object.keys(source)
.reduce(function (r, key) { r[key] = source[key]; return r; }, destination);
}
function parseURLQueryArgs() {
const search = window.location.search || '';
@@ -44,6 +49,8 @@ function main() {
const args = parseURLQueryArgs();
const configuration = JSON.parse(args['config'] || '{}') || {};
assign(process.env, configuration.userEnv);
//#region Add support for using node_modules.asar
(function () {
const path = require('path');