core: Fix bug where if outputting empty string, would output nothing
This commit is contained in:
parent
abf7c0526b
commit
68fe0b4258
|
@ -296,8 +296,13 @@ module Vagrant
|
||||||
target = @prefix
|
target = @prefix
|
||||||
target = opts[:target] if opts.has_key?(:target)
|
target = opts[:target] if opts.has_key?(:target)
|
||||||
|
|
||||||
|
# Get the lines. The first default is because if the message
|
||||||
|
# is an empty string, then we want to still use the empty string.
|
||||||
|
lines = [message]
|
||||||
|
lines = message.split("\n") if message != ""
|
||||||
|
|
||||||
# Otherwise, make sure to prefix every line properly
|
# Otherwise, make sure to prefix every line properly
|
||||||
message.split("\n").map do |line|
|
lines.map do |line|
|
||||||
"#{prefix}#{target}: #{line}"
|
"#{prefix}#{target}: #{line}"
|
||||||
end.join("\n")
|
end.join("\n")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue