Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

environment override variables are printed to stderr #2129

Closed
slingamn opened this issue Feb 23, 2024 · 1 comment
Closed

environment override variables are printed to stderr #2129

slingamn opened this issue Feb 23, 2024 · 1 comment
Labels
Milestone

Comments

@slingamn
Copy link
Member

slingamn commented Feb 23, 2024

Reported by eta in #ergo. This almost seems like a debugging print that got left in the release:

ergo/irc/config.go

Lines 1129 to 1131 in c67835c

} else if applied {
log.Printf("applied environment override: %s\n", envPair)
}

We can't log at level debug because we don't have the actual logger yet. Let's print the variable name but not the value.

@slingamn slingamn added this to the 2.14 milestone Feb 23, 2024
@slingamn
Copy link
Member Author

slingamn commented Feb 23, 2024

Incidentally, an envvar override with an invalid format will panic

ergo/irc/config.go

Lines 1047 to 1048 in c67835c

equalIdx := strings.IndexByte(envPair, '=')
name, value := envPair[:equalIdx], envPair[equalIdx+1:]

(never mind, I forgot how os.Environ works)

slingamn added a commit to slingamn/ergo that referenced this issue Feb 25, 2024
Don't print the values of environment variable overrides, just the keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant