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

Migration.rb: deal with $stdin being Nil (happend for some reason in … #278

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 6 additions & 1 deletion lib/svn2git/migration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,12 @@ 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
str = $stdin.gets
if str
@stdin_queue << $stdin.gets.chomp
end
end
end

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