Skip to content

Commit

Permalink
Only emit a warning if the envvar has changed (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
sethvargo committed Nov 26, 2022
1 parent 400b51b commit 23620af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/main/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ async function main() {
*/
function exportVariableAndWarn(key: string, value: string) {
const existing = process.env[key];
if (existing) {
if (existing && existing !== value) {
const old = JSON.stringify(existing);
logWarning(`Overwriting existing environment variable ${key} (was: ${old})`);
}
Expand Down

0 comments on commit 23620af

Please sign in to comment.