lib/nanoc/base/services/executor.rb in nanoc-4.1.1 vs lib/nanoc/base/services/executor.rb in nanoc-4.1.2
- old
+ new
@@ -32,14 +32,15 @@
# Run filter
last = rep.snapshot_contents[:last]
source = rep.binary? ? last.filename : last.string
result = filter.setup_and_run(source, filter_args)
- if klass.to_binary?
- rep.snapshot_contents[:last] = Nanoc::Int::BinaryContent.new(filter.output_filename).tap(&:freeze)
- else
- rep.snapshot_contents[:last] = Nanoc::Int::TextualContent.new(result).tap(&:freeze)
- end
+ rep.snapshot_contents[:last] =
+ if klass.to_binary?
+ Nanoc::Int::BinaryContent.new(filter.output_filename).tap(&:freeze)
+ else
+ Nanoc::Int::TextualContent.new(result).tap(&:freeze)
+ end
# Check whether file was written
if klass.to_binary? && !File.file?(filter.output_filename)
raise OutputNotWrittenError.new(filter_name, filter.output_filename)
end