lib/nanoc/cli.rb in nanoc-4.8.0 vs lib/nanoc/cli.rb in nanoc-4.8.1

- old
+ new

@@ -94,18 +94,18 @@ def self.setup_commands # Reinit @root_command = nil # Add root command - filename = File.dirname(__FILE__) + '/cli/commands/nanoc.rb' + filename = __dir__ + '/cli/commands/nanoc.rb' @root_command = load_command_at(filename) # Add help command help_cmd = Cri::Command.new_basic_help add_command(help_cmd) # Add other commands - cmd_filenames = Dir[File.dirname(__FILE__) + '/cli/commands/*.rb'] + cmd_filenames = Dir[__dir__ + '/cli/commands/*.rb'] cmd_filenames.each do |cmd_filename| next if File.basename(cmd_filename, '.rb') == 'nanoc' cmd = load_command_at(cmd_filename) add_command(cmd) end