diff options
author | WheresAlice <WheresAlice@users.noreply.github.com> | 2018-08-06 16:29:49 +0100 |
---|---|---|
committer | WheresAlice <WheresAlice@users.noreply.github.com> | 2018-08-06 16:29:49 +0100 |
commit | 0dd424966e2aebfd9052956c3888414d9d4574dc (patch) | |
tree | aad5930eebfec25d517d7b1d6705079f8f53a140 /lib | |
parent | 14dc5700fb7e6c66514414fc4fb861c0d7cb50e6 (diff) | |
download | ohai-0dd424966e2aebfd9052956c3888414d9d4574dc.tar.gz |
rename timeout to shellout_timeout to make it clearer
Signed-off-by: WheresAlice <WheresAlice@users.noreply.github.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ohai/config.rb | 2 | ||||
-rw-r--r-- | lib/ohai/mixin/command.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/ohai/config.rb b/lib/ohai/config.rb index 4ee7dfb8..6029a26f 100644 --- a/lib/ohai/config.rb +++ b/lib/ohai/config.rb @@ -40,7 +40,7 @@ module Ohai default :run_all_plugins, false # optional plugins are the set of plugins that are marked optional but you wish to run. default :optional_plugins, [] - default :timeout, 30 + default :shellout_timeout, 30 end end diff --git a/lib/ohai/mixin/command.rb b/lib/ohai/mixin/command.rb index 073dae4d..eb4844b5 100644 --- a/lib/ohai/mixin/command.rb +++ b/lib/ohai/mixin/command.rb @@ -29,7 +29,7 @@ module Ohai def shell_out(cmd, **options) options = options.dup # unless specified by the caller timeout after configured timeout (default 30 seconds) - options[:timeout] ||= Ohai::Config.ohai[:timeout] + options[:timeout] ||= Ohai::Config.ohai[:shellout_timeout] unless RUBY_PLATFORM =~ /mswin|mingw32|windows/ options[:env] = options.key?(:env) ? options[:env].dup : {} options[:env]["PATH"] ||= ((ENV["PATH"] || "").split(":") + %w{/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin}).join(":") |