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

Fix two issues relating to a bug that caused runners not to exit #37

Merged
merged 1 commit into from
Jan 8, 2024
Merged
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: 6 additions & 4 deletions lib/selective/ruby/core/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,11 @@ def kill_transport(signal: "TERM")
end

def handle_command(data)
send("handle_#{data[:command]}", data)
rescue NoMethodError
raise "Unknown command received: #{data[:command]}" if debug?
if respond_to? "handle_#{data[:command]}", true
send("handle_#{data[:command]}", data)
else
raise "Unknown command received: #{data[:command]}" if debug?
end
end

def handle_print_notice(data)
Expand Down Expand Up @@ -262,7 +264,7 @@ def handle_print_message(data)
def handle_close(data)
exit_status = data[:exit_status]
self.class.restore_reporting!
runner.finish unless exit_status.is_a?(Integer)
with_error_handling { runner.finish } unless exit_status.is_a?(Integer)

kill_transport
pipe.delete_pipes
Expand Down