Skip to content

Commit

Permalink
fix Open3.popen3 method execution
Browse files Browse the repository at this point in the history
  • Loading branch information
hvaldecantos committed Apr 7, 2015
1 parent 080f219 commit 146b91f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/git_cmd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ def execute sub_cmd
result = nil
begin
Open3.popen3(GIT_CMD + sub_cmd) do |i, o, e, t|
result = o.read
error = e.read
raise StandardError, error unless (t.value.success? or error.empty?)
result = o.read
result
end
ensure
Dir.chdir cwd
Expand Down

0 comments on commit 146b91f

Please sign in to comment.