diff options
author | Patrick Schaumburg <pschaumburg@tecracer.de> | 2020-03-30 15:48:41 +0200 |
---|---|---|
committer | Patrick Schaumburg <pschaumburg@tecracer.de> | 2020-03-30 15:48:41 +0200 |
commit | 060229bc5d9d462cff553263cd58b7e8748fa1ee (patch) | |
tree | d7ab8f30fe4ebdf08d7d1fc86c52a220ad40f3e4 | |
parent | 7f2c18cc10c859aaade58089d78eee0060214f14 (diff) | |
download | chef-060229bc5d9d462cff553263cd58b7e8748fa1ee.tar.gz |
fix 2 lintings
-rw-r--r-- | lib/chef/resource/windows_firewall_rule.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/resource/windows_firewall_rule.rb b/lib/chef/resource/windows_firewall_rule.rb index 6d89397955..52aa4ac7cd 100644 --- a/lib/chef/resource/windows_firewall_rule.rb +++ b/lib/chef/resource/windows_firewall_rule.rb @@ -247,6 +247,8 @@ class Chef return false unless protocol.start_with?("ICMP") return false unless (0..255).include?(icmp_type) + true + elsif icmp_type.is_a?(String) return false if !protocol.start_with?("ICMP") && icmp_type !~ /^\D+$/ @@ -256,8 +258,7 @@ class Chef return icmp_type.split(":").all? { |type| (0..255).include?(type.to_i) } end - else - return true + true end end end |