Provide output on raising LinuxMountFailed
This commit is contained in:
parent
407f8dad1e
commit
97589636b1
|
@ -51,10 +51,15 @@ module VagrantPlugins
|
||||||
while true
|
while true
|
||||||
success = true
|
success = true
|
||||||
|
|
||||||
|
stderr = ""
|
||||||
mount_commands.each do |command|
|
mount_commands.each do |command|
|
||||||
no_such_device = false
|
no_such_device = false
|
||||||
|
stderr = ""
|
||||||
status = machine.communicate.sudo(command, error_check: false) do |type, data|
|
status = machine.communicate.sudo(command, error_check: false) do |type, data|
|
||||||
no_such_device = true if type == :stderr && data =~ /No such device/i
|
if type == :stderr
|
||||||
|
no_such_device = true if data =~ /No such device/i
|
||||||
|
stderr += data.to_s
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
success = status == 0 && !no_such_device
|
success = status == 0 && !no_such_device
|
||||||
|
@ -69,7 +74,8 @@ module VagrantPlugins
|
||||||
command.gsub!(smb_password, "PASSWORDHIDDEN")
|
command.gsub!(smb_password, "PASSWORDHIDDEN")
|
||||||
|
|
||||||
raise Vagrant::Errors::LinuxMountFailed,
|
raise Vagrant::Errors::LinuxMountFailed,
|
||||||
command: command
|
command: command,
|
||||||
|
output: stderr
|
||||||
end
|
end
|
||||||
|
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
Loading…
Reference in New Issue