diff --git a/lib/interface/cli/commands/hybrid/init.cmd.js b/lib/interface/cli/commands/hybrid/init.cmd.js index 4615a1452..6a07d2c95 100644 --- a/lib/interface/cli/commands/hybrid/init.cmd.js +++ b/lib/interface/cli/commands/hybrid/init.cmd.js @@ -213,6 +213,10 @@ const initCmd = new Command({ const detectedProxyVars = detectProxy(); httpProxy = httpProxy || detectedProxyVars.httpProxy; httpsProxy = httpsProxy || detectedProxyVars.httpsProxy; + envVars = envVars || []; + if (!Array.isArray(envVars)) { + envVars = [envVars]; + } if (noQuestions) { // use defaults kubeContextName = kubeContextName || getKubeContext(kubeConfigPath); @@ -342,10 +346,12 @@ const initCmd = new Command({ } if (httpProxy) { - envVars = _.merge(envVars || {}, { http_proxy: httpProxy, HTTP_PROXY: httpProxy }); + envVars.push(`http_proxy=${httpProxy}`); + envVars.push(`HTTP_PROXY=${httpProxy}`); } if (httpsProxy) { - envVars = _.merge(envVars || {}, { https_proxy: httpsProxy, HTTPS_PROXY: httpsProxy }); + envVars.push(`https_proxy=${httpsProxy}`); + envVars.push(`HTTPS_PROXY=${httpsProxy}`); } // save the answers for backup diff --git a/package.json b/package.json index 13a5388e7..967d1cec0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codefresh", - "version": "0.71.2", + "version": "0.71.3", "description": "Codefresh command line utility", "main": "index.js", "preferGlobal": true,