Skip to content

Commit 334e3df

Browse files
committed
Improve logging to include proxy vars
1 parent 5d9bf37 commit 334e3df

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

go/extractor/util/registryproxy.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,6 @@ func getEnvVars() []string {
141141

142142
// Applies private package proxy related environment variables to `cmd`.
143143
func ApplyProxyEnvVars(cmd *exec.Cmd) {
144-
slog.Debug(
145-
"Applying private registry proxy environment variables",
146-
slog.String("cmd_args", strings.Join(cmd.Args, " ")),
147-
)
148-
149144
// If we haven't done so yet, check whether the proxy environment variables are set
150145
// and extract information from them.
151146
if !proxy_vars_checked {
@@ -159,4 +154,10 @@ func ApplyProxyEnvVars(cmd *exec.Cmd) {
159154
if proxy_vars != nil {
160155
cmd.Env = append(os.Environ(), proxy_vars...)
161156
}
157+
158+
slog.Debug(
159+
"Applying private registry proxy environment variables",
160+
slog.String("cmd_args", strings.Join(cmd.Args, " ")),
161+
slog.String("proxy_vars", strings.Join(proxy_vars, ",")),
162+
)
162163
}

0 commit comments

Comments
 (0)