lib/aws/cfn/compiler/mixins/save.rb in aws-cfn-compiler-0.8.8 vs lib/aws/cfn/compiler/mixins/save.rb in aws-cfn-compiler-0.8.9
- old
+ new
@@ -42,10 +42,10 @@
else
File.join(dir, file)
end
logStep "Saving #{brick} to #{filn} "
# noinspection RubyAssignmentExpressionInConditionalInspection
- if match = file.match(%r'\.(.*)$')
+ if match = file.match(%r'\.([^\.]*)$')
if (section != '') and (not formats_compatible?(format, match[1]))
msg = "The file extension (#{match[1]}) does not match the chosen output format (#{format})!"
if @config[:force]
logger.warn msg
else