Skip to content

Commit

Permalink
Fix order of file change events in watchexec watcher
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexB52 committed Dec 2, 2024
1 parent bd5d6cd commit f63ea50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/retest/watcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def self.watch(dir:, extensions:, polling: false)
data = conn.readpartial(4096)
change = /^(?:create|remove|rename|modify):(?<path>.*)/.match(data.strip)
if change
added, modified, removed = result = [[], [], []]
modified, added, removed = result = [[], [], []]
path = Pathname(change[:path]).relative_path_from(Dir.pwd).to_s
file_exist = File.exist?(path)
file_cached = files.key?(path)
Expand Down

0 comments on commit f63ea50

Please sign in to comment.