summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-12-04 12:23:43 -0800
committerGitHub <noreply@github.com>2017-12-04 12:23:43 -0800
commit212678beefb45d85ac06842de7082a820f67e77a (patch)
tree622fecdef6b023631abfc980c6f988ce09c760a9
parente0c19664cb46e8e7aa1ff15b4792731a801c211a (diff)
parent9f795ee741450f9c03da07eae101838b7fc5849d (diff)
downloadohai-212678beefb45d85ac06842de7082a820f67e77a.tar.gz
Merge pull request #1099 from chef/rubygems_requir
Remove the rubygems require in the main app
-rwxr-xr-xbin/ohai21
1 files changed, 3 insertions, 18 deletions
diff --git a/bin/ohai b/bin/ohai
index 4bc6b066..d8e1cc89 100755
--- a/bin/ohai
+++ b/bin/ohai
@@ -19,23 +19,8 @@
# limitations under the License.
#
-begin
- require "rubygems"
-rescue LoadError
- # must be debian! ;)
- missing_rubygems = true
-end
-begin
- # if we're in a source code checkout, we want to run the code from that.
- # have to do this *after* rubygems is loaded.
- $:.unshift File.expand_path("../../lib", __FILE__)
- require "ohai/application"
-rescue LoadError
- if missing_rubygems
- STDERR.puts "rubygems previously failed to load - is it installed?"
- end
-
- raise
-end
+# if we're in a source code checkout, we want to run the code from that.
+$:.unshift File.expand_path("../../lib", __FILE__)
+require "ohai/application"
Ohai::Application.new.run