fix: ensure files are sorted by name
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Glenn Y. Rolland 2024-01-23 16:23:32 +01:00
parent 2d97187e4f
commit 74a52a43e0
2 changed files with 3 additions and 3 deletions

View file

@ -127,7 +127,7 @@ module CodePreloader
STDERR.puts "Processing source directories: #{source_list}".colorize(:yellow)
processed_files = [] of ProcessedFile
filelist.each do |file_path|
filelist.to_a.sort.each do |file_path|
STDERR.puts "Processing file: #{file_path}".colorize(:yellow)
file_result = process_file(file_path, output_file)
processed_files << file_result

View file

@ -46,7 +46,7 @@ module CodePreloader
seen = Set(String).new
# walk each source
@sources.each do |dir|
@sources.sort.each do |dir|
walker = Walk::Down.new(dir)
walker = walker.filter do |path|
@ -88,7 +88,7 @@ module CodePreloader
self.each do |path|
files << path.to_s
end
files
files.sort
end
end
end