diff --git a/rb/lib/selenium/webdriver/common/service_manager.rb b/rb/lib/selenium/webdriver/common/service_manager.rb index 92461a7081c9c..e4c416bd9e6bd 100644 --- a/rb/lib/selenium/webdriver/common/service_manager.rb +++ b/rb/lib/selenium/webdriver/common/service_manager.rb @@ -80,8 +80,8 @@ def uri def build_process(*command) WebDriver.logger.debug("Executing Process #{command}", id: :driver_service) @process = ChildProcess.build(*command) - @process.io = @io - @process.io ||= WebDriver.logger.io if WebDriver.logger.debug? + @io ||= WebDriver.logger.io if WebDriver.logger.debug? + @process.io = @io if @io @process end