Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial Windows support #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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