diff options
author | Tim Smith <tsmith84@gmail.com> | 2019-09-04 14:53:08 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2019-09-04 14:53:08 -0700 |
commit | 7a5c29786f46c6bb093ed36619938bc8fbfbe16f (patch) | |
tree | 242e97f971e0635291e56a7ee745269515fc47a0 | |
parent | 8747ae1bdde2137e72b2482a8e2b989c316ab3b3 (diff) | |
download | ohai-7a5c29786f46c6bb093ed36619938bc8fbfbe16f.tar.gz |
Avoid failures on windows with dreamhost detection
We're on openstack for sure if we're on windows
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/ohai/plugins/openstack.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ohai/plugins/openstack.rb b/lib/ohai/plugins/openstack.rb index 112479f5..22dd1920 100644 --- a/lib/ohai/plugins/openstack.rb +++ b/lib/ohai/plugins/openstack.rb @@ -47,6 +47,9 @@ Ohai.plugin(:Openstack) do # dreamhost systems have the dhc-user on them def openstack_provider + # dream host doesn't support windows so bail early if we're on windows + return "openstack" if RUBY_PLATFORM =~ /mswin|mingw32|windows/ + if Etc.getpwnam("dhc-user") "dreamhost" end |