diff --git a/checks/env_variables.rb b/checks/env_variables.rb deleted file mode 100755 index 0004d42e..00000000 --- a/checks/env_variables.rb +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env ruby - -variables = %w[http_proxy https_proxy ssl_cert_file - HTTP_PROXY HTTPS_PROXY SSL_CERT_FILE] - -if variables.map { |variable| ENV[variable] }.compact.any? - $stderr.puts "Please unset the following environment variables before running the installer: #{variables.join(', ')}" - exit 1 -end diff --git a/hooks/boot/05-environment.rb b/hooks/boot/05-environment.rb new file mode 100644 index 00000000..bf8d672e --- /dev/null +++ b/hooks/boot/05-environment.rb @@ -0,0 +1,5 @@ +%w[http_proxy https_proxy ssl_cert_file HTTP_PROXY HTTPS_PROXY SSL_CERT_FILE].each do |variable| + if ::ENV.delete(variable) + logger.warn "Unsetting environment variable '#{variable}' for the duration of the install." + end +end