lib/mixlib/install/util.rb in mixlib-install-3.11.12 vs lib/mixlib/install/util.rb in mixlib-install-3.11.18

- old
+ new

@@ -64,13 +64,16 @@ end if opts[:https_proxy] env << Util.shell_env_var("https_proxy", opts[:https_proxy], powershell) env << Util.shell_env_var("HTTPS_PROXY", opts[:https_proxy], powershell) end + unless env.empty? + code = env.join("\n").concat("\n").concat(code) + end if powershell - env.join("\n").concat("\n").concat(code) + "\n" + code else - Util.wrap_command(env.join("\n").concat("\n").concat(code)) + Util.wrap_command(code) end end # Builds a shell environment variable assignment string for the # required shell type.