Skip to content

Commit

Permalink
allow nokogiri:generate to run in isolation
Browse files Browse the repository at this point in the history
create the directory paths as needed instead of up-front
  • Loading branch information
flavorjones committed Nov 19, 2023
1 parent d1ea07e commit 95913b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tasks/nokogiri_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def create_nokogiri_tasks(source_dir, dest_dir)
file_pairs[adr] = adr
end
end
FileUtils.mkdir_p(File.join(dest_dir, "adr"))

dest_paths = []

Expand All @@ -38,6 +37,8 @@ def create_nokogiri_tasks(source_dir, dest_dir)
end

file(dest_path => source_path) do
target_dir = File.dirname(dest_path)
FileUtils.mkdir_p(target_dir, verbose: true) unless File.directory?(target_dir)
FileUtils.cp(source_path, dest_path, verbose: true)
modify_readme_links(dest_path)
end
Expand Down

0 comments on commit 95913b4

Please sign in to comment.