providers/virtualbox: nitpick on style
This commit is contained in:
parent
56eb53d8af
commit
cfe17076b5
|
@ -26,7 +26,8 @@ module VagrantPlugins
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
env[:machine].provider.driver.execute_command(processed_command + [:retryable => true])
|
env[:machine].provider.driver.execute_command(
|
||||||
|
processed_command + [retryable: true])
|
||||||
rescue Vagrant::Errors::VBoxManageError => e
|
rescue Vagrant::Errors::VBoxManageError => e
|
||||||
raise Vagrant::Errors::VMCustomizationFailed, {
|
raise Vagrant::Errors::VMCustomizationFailed, {
|
||||||
:command => command,
|
:command => command,
|
||||||
|
|
|
@ -37,9 +37,9 @@ module VagrantPlugins
|
||||||
command = ["modifyvm", env[:machine].id, "--natdnsproxy1", "on"]
|
command = ["modifyvm", env[:machine].id, "--natdnsproxy1", "on"]
|
||||||
attempt_and_log(command, "Enable the NAT DNS proxy on adapter 1...")
|
attempt_and_log(command, "Enable the NAT DNS proxy on adapter 1...")
|
||||||
else
|
else
|
||||||
command = [ "modifyvm", env[:machine].id, "--natdnsproxy1", "off" ]
|
command = ["modifyvm", env[:machine].id, "--natdnsproxy1", "off" ]
|
||||||
attempt_and_log(command, "Disable the NAT DNS proxy on adapter 1...")
|
attempt_and_log(command, "Disable the NAT DNS proxy on adapter 1...")
|
||||||
command = [ "modifyvm", env[:machine].id, "--natdnshostresolver1", "off" ]
|
command = ["modifyvm", env[:machine].id, "--natdnshostresolver1", "off" ]
|
||||||
attempt_and_log(command, "Disable the NAT DNS resolver on adapter 1...")
|
attempt_and_log(command, "Disable the NAT DNS resolver on adapter 1...")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
@ -64,7 +64,8 @@ module VagrantPlugins
|
||||||
# @param [String] log Log message to write.
|
# @param [String] log Log message to write.
|
||||||
def attempt_and_log(command, log)
|
def attempt_and_log(command, log)
|
||||||
begin
|
begin
|
||||||
@env[:machine].provider.driver.execute_command(command + [:retryable => true])
|
@env[:machine].provider.driver.execute_command(
|
||||||
|
command + [retryable: true])
|
||||||
rescue Vagrant::Errors::VBoxManageError => e
|
rescue Vagrant::Errors::VBoxManageError => e
|
||||||
@logger.info("#{log} (error = #{e.inspect})")
|
@logger.info("#{log} (error = #{e.inspect})")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue