Skip to content

Commit

Permalink
exclude directories from the list of files to compare
Browse files Browse the repository at this point in the history
  • Loading branch information
Jess Bees committed Feb 1, 2022
1 parent ac02ba7 commit 89a4014
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/compare_expected_output
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ project_path = ARGV[0]

Dir.chdir(project_path)

expected_files = Dir["_expected/**/*"].map { |path| Pathname.new(path).relative_path_from("_expected").to_s }
actual_files = Dir["_site/**/*"].map { |path| Pathname.new(path).relative_path_from("_site").to_s }
expected_files = Dir["_expected/**/*"].select { |path| File.file?(path) }.map { |path| Pathname.new(path).relative_path_from("_expected").to_s }
actual_files = Dir["_site/**/*"].select { |path| File.file?(path) }.map { |path| Pathname.new(path).relative_path_from("_site").to_s }

differences = []

Expand Down

0 comments on commit 89a4014

Please sign in to comment.