From 15efa9f7d54ccb031d081b974d9da7f1c583d6c4 Mon Sep 17 00:00:00 2001 From: Taknok Date: Thu, 17 Feb 2022 23:14:20 +0100 Subject: [PATCH 1/2] Fix error chomp on nil gets may return nil and chomp cannot be done on nil --- lib/svn2git/migration.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/svn2git/migration.rb b/lib/svn2git/migration.rb index 4de8a9e..9895245 100755 --- a/lib/svn2git/migration.rb +++ b/lib/svn2git/migration.rb @@ -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, From 4104e7e53530920a52e448c5bab390436fd0e2e7 Mon Sep 17 00:00:00 2001 From: Taknok Date: Sat, 19 Feb 2022 23:47:35 +0100 Subject: [PATCH 2/2] set bin executable to suppress warning --- bin/svn2git | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 bin/svn2git diff --git a/bin/svn2git b/bin/svn2git old mode 100644 new mode 100755