lib/nanoc/cli.rb in nanoc-4.0.1 vs lib/nanoc/cli.rb in nanoc-4.0.2
- old
+ new
@@ -150,10 +150,10 @@
# @param [String] filename The name of the file that contains the command
#
# @return [Cri::Command] The loaded command
def self.load_command_at(filename, command_name = nil)
# Load
- code = File.read(filename)
+ code = File.read(filename, encoding: 'UTF-8')
cmd = Cri::Command.define(code, filename)
# Set name
command_name ||= File.basename(filename, '.rb')
cmd.modify { name command_name }