Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Commit

Permalink
Fixes #14956 - Check for proxy before katello-installer runs (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris1984 authored and stbenjam committed Jun 1, 2016
1 parent 9baaae2 commit af52c83
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions checks/proxy.rb
@@ -0,0 +1,15 @@
#!/usr/bin/env ruby

# checking to see if http/https proxy envs are set before running the installer

http_proxy = ENV['http_proxy']
https_proxy = ENV['https_proxy']

PROXYSET = "Please unset the http_proxy and/or https_proxy environment variables before running the installer"

def error_exit(message, code)
$stderr.puts message
exit code
end

error_exit(PROXYSET, 1) if http_proxy != nil || https_proxy != nil

0 comments on commit af52c83

Please sign in to comment.