Skip to content
Open
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
Empty file modified bin/svn2git
100644 → 100755
Empty file.
10 changes: 9 additions & 1 deletion lib/svn2git/migration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,15 @@ def run_command(cmd, exit_on_error=true, printout_output=false)
# for input and place any received values on a queue for consumption by a pass-through thread that will forward
# the contents to the underlying sub-process's stdin pipe.
@stdin_thread ||= Thread.new do
loop { @stdin_queue << $stdin.gets.chomp }
loop do
# gets may return nil, and nil cannot be chomped
input = $stdin.gets
if input.nil?
@stdin_queue << input
else
@stdin_queue << input.chomp
end
end
end

# Open4 forks, which JRuby doesn't support. But JRuby added a popen4-compatible method on the IO class,
Expand Down