From aa7e79a0399fddefe67c248a0d5a9b13bb27659b Mon Sep 17 00:00:00 2001 From: Albin Ekblom Date: Fri, 28 Apr 2017 22:57:17 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Handle=20electron=20default=20en?= =?UTF-8?q?v=20(#1764)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/session.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/session.js b/app/session.js index 13399b3c..8ce1ba55 100644 --- a/app/session.js +++ b/app/session.js @@ -30,6 +30,13 @@ module.exports = class Session extends EventEmitter { TERM_PROGRAM_VERSION: version }, envFromConfig); + // Electron has a default value for process.env.GOOGLE_API_KEY + // We don't want to leak this to the shell + // See https://github.com/zeit/hyper/issues/696 + if (baseEnv.GOOGLE_API_KEY && process.env.GOOGLE_API_KEY === baseEnv.GOOGLE_API_KEY) { + delete baseEnv.GOOGLE_API_KEY; + } + const decoder = new StringDecoder('utf8'); const defaultShellArgs = ['--login'];