Skip to content

Commit be41169

Browse files
committedDec 6, 2024
Add .exe extension name when run command in windows
1 parent 5649916 commit be41169

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed
 

‎src/sentry/process_runner.cr

+12-4
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,20 @@ module Sentry
3535
{% end %}
3636
end
3737

38+
def run_command : String
39+
{% if flag?(:win32) %}
40+
"#{@run_command}.exe"
41+
{% else %}
42+
@run_command
43+
{% end %}
44+
end
45+
3846
def run : Nil
3947
stdout "🤖 Your SentryBot is vigilant. beep-boop..."
4048

4149
run_shards_install if @run_shards_install
4250

43-
File.delete?(@run_command) if @should_build
51+
File.delete?(run_command) if @should_build
4452

4553
loop do
4654
if @should_kill
@@ -166,15 +174,15 @@ module Sentry
166174

167175
stdout "🤖 starting #{@display_name}..."
168176

169-
if File.file?(@run_command)
177+
if File.file?(run_command)
170178
@app_process = Process.new(
171-
@run_command,
179+
run_command,
172180
@run_args_list,
173181
output: :inherit,
174182
error: :inherit
175183
)
176184
else
177-
puts "🤖 Sentry error: the inferred run command file(#{@run_command}) \
185+
puts "🤖 Sentry error: the inferred run command file(#{run_command}) \
178186
does not exist. either set correct run command use `-r COMMAND' or fix the \
179187
`BUILD ARGS' to output correct run command. SentryBot shutting down..."
180188
exit 1

0 commit comments

Comments
 (0)