lib/nanoc/base/repos/config_loader.rb in nanoc-4.9.4 vs lib/nanoc/base/repos/config_loader.rb in nanoc-4.9.5

- old
+ new

@@ -44,11 +44,14 @@ raise NoConfigFileFoundError if filename.nil? # Read config = apply_parent_config( - Nanoc::Int::Configuration.new(hash: load_file(filename)), + Nanoc::Int::Configuration.new( + hash: load_file(filename), + dir: File.dirname(filename), + ), [filename], ).with_defaults # Load environment config.with_environment @@ -80,10 +83,10 @@ if processed_paths.include?(parent_path) raise CyclicalConfigFileError.new(parent_path) end # Load - parent_config = Nanoc::Int::Configuration.new(hash: load_file(parent_path)) + parent_config = Nanoc::Int::Configuration.new(hash: load_file(parent_path), dir: config.dir) full_parent_config = apply_parent_config(parent_config, processed_paths + [parent_path]) full_parent_config.merge(config.without(:parent_config_file)) end end end