From b2b488fa438e953e7d304ffc7d37b90d2362a4c8 Mon Sep 17 00:00:00 2001 From: Rachel Macfarlane Date: Mon, 2 Mar 2020 12:45:33 -0800 Subject: [PATCH] Only write config file during postinstall if process env variables are present (#91793) --- extensions/github-authentication/build/postinstall.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/github-authentication/build/postinstall.js b/extensions/github-authentication/build/postinstall.js index e12fd05f191..16e51347559 100644 --- a/extensions/github-authentication/build/postinstall.js +++ b/extensions/github-authentication/build/postinstall.js @@ -20,7 +20,9 @@ function main() { } } - fs.writeFileSync(path.join(__dirname, '../src/common/config.json'), JSON.stringify(content)); + if (Object.keys(content).length > 0) { + fs.writeFileSync(path.join(__dirname, '../src/common/config.json'), JSON.stringify(content)); + } } main(); -- GitLab