lib/kitchen/driver/aws/standard_platform/macos.rb in kitchen-ec2-3.17.0 vs lib/kitchen/driver/aws/standard_platform/macos.rb in kitchen-ec2-3.17.1
- old
+ new
@@ -37,13 +37,13 @@
search["architecture"] = "arm64_mac" if architecture == "arm64"
search
end
def self.from_image(driver, image)
- if /amzn-ec2-macos/i.match?(image.name)
- image.name =~ /\b(\d+(\.\d+[\.\d])?)/i
- new(driver, "macos", (Regexp.last_match || [])[1], image.architecture)
- end
+ return unless /amzn-ec2-macos/i.match?(image.name)
+
+ image.name =~ /\b(\d+(\.\d+[\.\d])?)/i
+ new(driver, "macos", (Regexp.last_match || [])[1], image.architecture)
end
end
end
end
end