#157: Fixed: FetchIpFromDnsmasqLeases returns []

This commit is contained in:
Vokhmin Alexey V 2013-10-12 01:16:09 +04:00
parent 23e25c40ab
commit c5a89a54ce
2 changed files with 9 additions and 2 deletions

View file

@ -119,7 +119,7 @@ module Vagrant
def supports_attach_with_namespaces?
unless defined?(@supports_attach_with_namespaces)
@supports_attach_with_namespaces = run(:attach, '-h', '2>&1').include?('--namespaces')
@supports_attach_with_namespaces = run(:attach, '-h', :show_stderr => true).values.join.include?('--namespaces')
end
return @supports_attach_with_namespaces

View file

@ -58,7 +58,14 @@ module Vagrant
# Return the output, making sure to replace any Windows-style
# newlines with Unix-style.
r.stdout.gsub("\r\n", "\n")
if opts[:show_stderr]
{
:stdout => r.stdout.gsub("\r\n", "\n"),
:stderr => r.stderr.gsub("\r\n", "\n")
}
else
r.stdout.gsub("\r\n", "\n")
end
end
def raw(*command, &block)