diff options
| -rw-r--r-- | xmake/plugins/watch/main.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/plugins/watch/main.lua b/xmake/plugins/watch/main.lua index 3293296fa..af96349b8 100644 --- a/xmake/plugins/watch/main.lua +++ b/xmake/plugins/watch/main.lua @@ -134,10 +134,11 @@ function main() status = "deleted" end print(event.path, status) - table.insert(events, event) + -- we use map to remove repeat event + events[event.path .. tostring(event.type)] = event count = count + 1 elseif count > 0 then - _run_command(events) + _run_command(table.values(events)) count = 0 end end |
