Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion bin/rubyshell
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env ruby
#!/usr/bin/env -S ruby --disable-gems
# frozen_string_literal: true

$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))

require "rubyshell"

if ARGV.first&.strip&.start_with? "exec"
Expand Down
4 changes: 2 additions & 2 deletions lib/rubyshell.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require "logger"

require_relative "rubyshell/version"
require_relative "rubyshell/command"
require_relative "rubyshell/chainer"
Expand Down Expand Up @@ -43,6 +41,8 @@ def debug?
attr_writer :logger

def logger
require "logger"

@logger ||= Logger.new($stdout)
end

Expand Down
1 change: 0 additions & 1 deletion lib/rubyshell/chainer.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

require "debug"
module RubyShell
class Chainer
attr_reader :parts, :options
Expand Down
2 changes: 1 addition & 1 deletion lib/rubyshell/terminal_executor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def self.capture(command, options) # rubocop:disable Metris/MethodLength,Metrics
until ios.empty?
status ||= w_thread.join(0)

readable, = IO.select(ios.keys, nil, nil, 0)
readable, = IO.select(ios.keys, nil, nil, SELECT_TIMEOUT)

break if !readable && status
next unless readable
Expand Down
Loading