Skip to content

Commit b950b8d

Browse files
committedDec 6, 2024
Initial windows support: samueleaton#68
1. Use process.terminate instead of signal(:kill) 2. Terminate app process before rebuilding on Windows
1 parent cc37d4c commit b950b8d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎src/sentry/process_runner.cr

+9-1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ module Sentry
139139
private def build_app_process : Process::Status
140140
stdout "🤖 compiling #{@display_name}..."
141141

142+
{% if flag?(:win32) %}
143+
if (app_process = @app_process).is_a? Process
144+
stdout "🤖 killing #{@display_name}..."
145+
app_process.terminate
146+
# app_process.wait
147+
end
148+
{% end %}
149+
142150
Process.run(
143151
@build_command,
144152
@build_args_list,
@@ -151,7 +159,7 @@ module Sentry
151159
if (app_process = @app_process).is_a? Process
152160
unless app_process.terminated?
153161
stdout "🤖 killing #{@display_name}..."
154-
app_process.signal(:kill)
162+
app_process.terminate
155163
app_process.wait
156164
end
157165
end

0 commit comments

Comments
 (0)