summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-04-02 23:25:01 -0400
committerGitHub <noreply@github.com>2018-04-02 23:25:01 -0400
commit6d28ccbfe8d28fd12b7a248e8190200228d2c142 (patch)
tree913bd8f5dd70b747a1ca052ba19623184c0334d3
parent454f51ee4f5fedf7b32506150566d80e458ba8fb (diff)
parent4218892cff41425cfeda27701485a8754a6b25a8 (diff)
downloadchef-6d28ccbfe8d28fd12b7a248e8190200228d2c142.tar.gz
Merge pull request #7107 from chef/hostname_win
Don't fail on every hostname with windows
-rw-r--r--lib/chef/resource/hostname.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/hostname.rb b/lib/chef/resource/hostname.rb
index 497176f45d..243c86287b 100644
--- a/lib/chef/resource/hostname.rb
+++ b/lib/chef/resource/hostname.rb
@@ -203,7 +203,7 @@ class Chef
end
else # windows
- raise "Windows hostnames cannot contain a period." if new_resource.hostname.match?(/./)
+ raise "Windows hostnames cannot contain a period." if new_resource.hostname.match?(/\./)
# suppress EC2 config service from setting our hostname
if ::File.exist?('C:\Program Files\Amazon\Ec2ConfigService\Settings\config.xml')