Skip to content

Commit

Permalink
fix(commands): ameba lints & move process to work on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
devnote-dev committed Aug 3, 2024
1 parent 49ccb75 commit b6093f0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/commands/watch.cr
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module Geode::Commands
dry = options.has? "dry"
pipe = options.has? "pipe"
err = IO::Memory.new
proc = Process.new "echo" # dummy process for variable access
proc = uninitialized Process

should_build = if options.has?("skip-start")
false
Expand Down Expand Up @@ -93,8 +93,7 @@ module Geode::Commands
end

unless old_stamps == new_stamps || new_stamps.all? &.in?(old_stamps)
diff = (new_stamps - old_stamps).size
sig.send diff
sig.send (new_stamps - old_stamps).size
old_stamps.concat new_stamps
end
end
Expand All @@ -108,10 +107,9 @@ module Geode::Commands
proc.terminate
end

stdout.puts "» Rebuilding (#{count} file change#{"s" if count > 1})"
proc = new_process name, target["main"], target["flags"]?, dry, pipe, err

spawn do
stdout.puts "» Rebuilding (#{count} file change#{"s" if count > 1})"
proc = new_process name, target["main"], target["flags"]?, dry, pipe, err
start = Time.monotonic
status = proc.wait
taken = format_time(Time.monotonic - start)
Expand Down

0 comments on commit b6093f0

Please sign in to comment.