diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-08-19 22:58:00 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-08-19 22:58:00 -0700 |
commit | 7cd521c4eca28cf24a1ae15f77d983db2be2e6a0 (patch) | |
tree | 770a7a5416f000ef96c5c2e16d12359054b37347 /bin | |
parent | 7e2d8e6a1b23cf459becfaaf0525a930bb2bd9e3 (diff) | |
download | chef-zero-7cd521c4eca28cf24a1ae15f77d983db2be2e6a0.tar.gz |
Optimize our requires
Avoid requiring things that are already defined. Rubygems is very slow at traversing the filesystem.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/chef-zero | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/chef-zero b/bin/chef-zero index 0b4a99a..56050ef 100755 --- a/bin/chef-zero +++ b/bin/chef-zero @@ -3,7 +3,7 @@ # Trap interrupts to quit cleanly. Signal.trap("INT") { exit 1 } -require "rubygems" +require "rubygems" unless defined?(Gem) $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))) require "chef_zero/log" |