mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[core] Fix display_stdout to process multiple lines output.
This commit is contained in:
parent
6bf0465fe1
commit
f10a3488f2
1 changed files with 6 additions and 1 deletions
|
@ -96,7 +96,12 @@ module Fog
|
||||||
attr_accessor :command, :stderr, :stdout, :status
|
attr_accessor :command, :stderr, :stdout, :status
|
||||||
|
|
||||||
def display_stdout
|
def display_stdout
|
||||||
Formatador.display_line(stdout.split("\r\n"))
|
data = stdout.split("\r\n")
|
||||||
|
if data.is_a?(String)
|
||||||
|
Formatador.display_line(data)
|
||||||
|
elsif data.is_a?(Array)
|
||||||
|
Formatador.display_lines(data)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def display_stderr
|
def display_stderr
|
||||||
|
|
Loading…
Add table
Reference in a new issue