From a95c01e0e4e5728eb99f5ef6e2245b8d91c7795f Mon Sep 17 00:00:00 2001 From: Aditya Rajan Date: Wed, 5 Jan 2022 22:32:46 +0530 Subject: pkg: use PROXY_VARS from c/common Signed-off-by: Aditya Rajan --- pkg/machine/ignition.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/machine/ignition.go') diff --git a/pkg/machine/ignition.go b/pkg/machine/ignition.go index de2026a1a..ac2cf71cf 100644 --- a/pkg/machine/ignition.go +++ b/pkg/machine/ignition.go @@ -10,6 +10,7 @@ import ( "os" "path/filepath" + "github.com/containers/common/pkg/config" "github.com/sirupsen/logrus" ) @@ -479,8 +480,7 @@ func getCerts(certsDir string, isDir bool) []File { func getProxyVariables() string { proxyOpts := "" - proxyVariables := []string{"HTTP_PROXY", "HTTPS_PROXY", "NO_PROXY", "http_proxy", "https_proxy", "no_proxy"} - for _, variable := range proxyVariables { + for _, variable := range config.ProxyEnv { if value, ok := os.LookupEnv(variable); ok { proxyOpts += fmt.Sprintf("\n export %s=%s", variable, value) } -- cgit v1.2.3-54-g00ecf