Emit a diff of each environment variable (#296)
Fixes https://github.com/google-github-actions/auth/issues/295
This commit is contained in:
parent
430ae13d31
commit
14b54cc192
2
dist/main/index.js
vendored
2
dist/main/index.js
vendored
File diff suppressed because one or more lines are too long
@ -299,8 +299,12 @@ async function main() {
|
||||
function exportVariableAndWarn(key: string, value: string) {
|
||||
const existing = process.env[key];
|
||||
if (existing && existing !== value) {
|
||||
const old = JSON.stringify(existing);
|
||||
logWarning(`Overwriting existing environment variable ${key} (was: ${old})`);
|
||||
logWarning(
|
||||
`Overwriting existing environment variable ${key}:
|
||||
- ${JSON.stringify(existing)}
|
||||
+ ${JSON.stringify(value)}
|
||||
`.trim(),
|
||||
);
|
||||
}
|
||||
|
||||
exportVariable(key, value);
|
||||
|
Loading…
Reference in New Issue
Block a user