Skip to content

Fix JRuby Build on Windows #500

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

Merged
merged 1 commit into from
Dec 22, 2020
Merged
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
Do not call chomp! on an IO object
Signed-off-by: James Couball <jcouball@yahoo.com>
  • Loading branch information
jcouball committed Dec 22, 2020
commit ddf048c7ae7ae42c639420eae24857167b0915ef
11 changes: 4 additions & 7 deletions lib/git/lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1050,15 +1050,12 @@ def command(cmd, *opts, &block)
@logger.debug(output)
end

if exitstatus > 1 || (exitstatus == 1 && output != '')
raise Git::GitExecuteError.new(git_cmd + ':' + output.to_s)
end
raise Git::GitExecuteError, "#{git_cmd}:#{output}" if
exitstatus > 1 || (exitstatus == 1 && output != '')

if command_opts[:chomp]
output.chomp! if output
end
output.chomp! if output && command_opts[:chomp] && !block_given?

return output
output
end

# Takes the diff command line output (as Array) and parse it into a Hash
Expand Down