Skip to content

Commit 14b54cc

Browse files
authored
Emit a diff of each environment variable (#296)
Fixes #295
1 parent 430ae13 commit 14b54cc

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

dist/main/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,12 @@ async function main() {
299299
function exportVariableAndWarn(key: string, value: string) {
300300
const existing = process.env[key];
301301
if (existing && existing !== value) {
302-
const old = JSON.stringify(existing);
303-
logWarning(`Overwriting existing environment variable ${key} (was: ${old})`);
302+
logWarning(
303+
`Overwriting existing environment variable ${key}:
304+
- ${JSON.stringify(existing)}
305+
+ ${JSON.stringify(value)}
306+
`.trim(),
307+
);
304308
}
305309

306310
exportVariable(key, value);

0 commit comments

Comments
 (0)