-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Description
https://build.golang.org/log/01632ff0d1e2a2a8aeeca54449561a80220e9296:
--- FAIL: TestConfig (0.00s)
config_test.go:25: Config() = &{8080 go-telemetry localhost:8081 .localstorage /root/.shrc-telemetry-uploaded ../config/config.json 102400 10m0s false false}, want &{8080 go-telemetry localhost:8081 .localstorage local-telemetry-uploaded ../config/config.json 102400 10m0s false false}
FAIL
FAIL golang.org/x/telemetry/godev/cmd/telemetrygodev 0.124s
This appears to be due to the use of the ENV environment variable for configuration:
https://go.googlesource.com/telemetry/+/b0bf2e6e269ce288c82914e7d126bfe345aa84e9/godev/cmd/telemetrygodev/config.go#75
Per https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html#tag_20_117_08, the standard meaning of the ENV variable is:
ENV
This variable, when and only when an interactive shell is invoked, shall be subjected to parameter expansion (see Parameter Expansion) by the shell, and the resulting value shall be used as a pathname of a file containing shell commands to execute in the current environment. The file need not be executable. If the expanded value of ENV is not an absolute pathname, the results are unspecified. ENV shall be ignored if the real and effective user IDs or real and effective group IDs of the process are different.
If godev/cmd/telemetrygodev needs a configuration variable to use for a different, Go-specific purpose, it should use a Go-specific variable name. (And probably the same is true for the PORT variable. 😅)