Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/sentry.cr
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ module Sentry
private def build_app_process
stdout "🤖 compiling #{display_name}..."
build_args = @build_args

# Windows cannot override an open app process. That's why we need to terminate it first.
{% if flag?(:win32) %}
if @app_process
@app_process.not_nil!.terminate
end
{% end %}

if build_args.size > 0
Process.run(@build_command, build_args, shell: true, output: Process::Redirect::Inherit, error: Process::Redirect::Inherit)
else
Expand All @@ -188,7 +196,7 @@ module Sentry
if app_process.is_a? Process
unless app_process.terminated?
stdout "🤖 killing #{display_name}..."
app_process.signal(:kill)
app_process.terminate
app_process.wait
end
end
Expand Down