realize
realize copied to clipboard
Does not properly kill the executable on rebuild in Windows
On windows when realize detects that a file has been modified, it will correctly trigger a rebuild, but it is not guaranteed to kill the executable prior to the rebuild. If the executable has bound to network sockets, then this results in an error when the tool auto rebuilds:
Is there a work around available for this?
The configuration for my run command is nothing really special, it looks like
schema:
- name: ...
path: .
commands:
build:
status: true
dir: cmd/exec
run:
status: true
dir: cmd/exec
Is there an additional option i need to put here for like a prerun that will kill the process?
Could it be related to this? https://github.com/golang/go/issues/22381
Hi Cameron, probably is related to golang/go#22381 but i'll make some test to confirm that
Thanks for the follow up @Asoseil :)
We worked around it by introducing a before
command that does:
scripts:
- type: before
command: taskkill /im [executable].exe /F
But we're looking forward to getting rid of the hook hahah
Any update?
The issue still persists with the latest version. Any update on the this?
Here is the solution, until it's merged to master use this on windows. https://github.com/oxequa/realize/pull/208