Permalink
Browse files

fix result

  • Loading branch information...
1 parent aa0de03 commit 9e6ccabb2463c5d60e36ce265c72f730c632e32e @youpy committed Feb 1, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/scissor/command.rb
View
6 lib/scissor/command.rb
@@ -47,9 +47,9 @@ def _run_command(full_command, force = false, ignore_error = false)
IO.select(ios)[0].each do |io|
case io
when stdout
- result = io.read
+ result += io.read
when stderr
- error = io.read
+ error += io.read
end
ios.delete(io) if io.eof?
@@ -58,7 +58,7 @@ def _run_command(full_command, force = false, ignore_error = false)
logger.debug(error) unless ignore_error
- if force && error
+ if force && !error.empty?
result = error
end
end

0 comments on commit 9e6ccab

Please sign in to comment.