diff options
author | Daniel DeLeo <dan@opscode.com> | 2010-05-11 11:16:49 -0700 |
---|---|---|
committer | Daniel DeLeo <dan@opscode.com> | 2010-05-11 11:16:49 -0700 |
commit | 9279ab1248dec6ab7cf2e636ee21b5b3828924f8 (patch) | |
tree | 47ce269f7686385f18e400a4b9c8fdeee6aae375 /bin | |
parent | 46c6d99a0a6e9b148cd827da9d38d0f55e76bfa3 (diff) | |
download | ohai-9279ab1248dec6ab7cf2e636ee21b5b3828924f8.tar.gz |
fix load path rejiggering to be less janky and also work
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ohai | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -19,9 +19,7 @@ # limitations under the License. # -require 'rubygems' -$: << File.join(File.dirname(__FILE__), "..", "lib") begin require 'rubygems' rescue LoadError @@ -29,6 +27,9 @@ rescue LoadError 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(File.dirname(__FILE__) + '/../lib')) require 'ohai/application' rescue LoadError if missing_rubygems |