Skip to content

Commit

Permalink
Use include for '.' search
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Powell <thomas.powell@progress.com>
  • Loading branch information
tpowell-progress committed Oct 4, 2023
1 parent ffa04af commit be77e96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ohai/mixin/network_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def canonicalize_hostname(hostname)
# However, we have found that Windows hosts that are not joined to a domain
# can return a non-qualified hostname).
# Use a '.' in the canonname as indicator of FQDN
return canonname if /\./.match?(canonname)
return canonname if canonname.include?(".")

# If we got a non-qualified name, then we do a standard reverse resolve
# which, assuming DNS is working, will work around that windows bug
Expand Down

0 comments on commit be77e96

Please sign in to comment.