Skip to content

Commit 711d497

Browse files
committed
Improve logging to include proxy vars
1 parent ce9c8e6 commit 711d497

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
@@ -113,11 +113,6 @@ func getEnvVars() []string {
113113

114114
// Applies private package proxy related environment variables to `cmd`.
115115
func ApplyProxyEnvVars(cmd *exec.Cmd) {
116-
slog.Debug(
117-
"Applying private registry proxy environment variables",
118-
slog.String("cmd_args", strings.Join(cmd.Args, " ")),
119-
)
120-
121116
// If we haven't done so yet, check whether the proxy environment variables are set
122117
// and extract information from them.
123118
if !proxy_vars_checked {
@@ -131,4 +126,10 @@ func ApplyProxyEnvVars(cmd *exec.Cmd) {
131126
if proxy_vars != nil {
132127
cmd.Env = append(os.Environ(), proxy_vars...)
133128
}
129+
130+
slog.Debug(
131+
"Applying private registry proxy environment variables",
132+
slog.String("cmd_args", strings.Join(cmd.Args, " ")),
133+
slog.String("proxy_vars", strings.Join(proxy_vars, ",")),
134+
)
134135
}

0 commit comments

Comments
 (0)