Skip to content

Commit

Permalink
Merge pull request #2 from tomjn/patch-2
Browse files Browse the repository at this point in the history
Updating wording of output
  • Loading branch information
Mte90 authored Jun 8, 2020
2 parents 15ac71f + 577e6c0 commit c0107ef
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/vagrant-goodhosts/GoodHosts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module GoodHosts

def getIps
if Vagrant.has_plugin?("vagrant-hostsupdater")
@ui.error "The Vagrant plugin vagrant-hostsupdater is installed but is executed always also when is not configured in your Vagrantfile!"
@ui.error "[vagrant-goodhosts] Warning: The vagrant-hostsupdater plugin is installed, hostsupdater always adds the VM name even if the VagrantFile says not to. This shouldn't cause issues, but if it does, uninstall hostsupdater"
end

ips = []
Expand All @@ -22,7 +22,7 @@ def getIps

@machine.config.vm.provider :hyperv do |v|
timeout = @machine.provider_config.ip_address_timeout
@ui.output("Waiting for the machine to report its IP address(might take some time, have a patience)...")
@ui.output("[vagrant-goodhosts] Waiting for the guest machine to report its IP address ( this might take some time, have patience )...")
@ui.detail("Timeout: #{timeout} seconds")

options = {
Expand Down Expand Up @@ -105,7 +105,7 @@ def addHostEntries
hostnames[ip].each do |hostname|
ip_address = ip
if !ip_address.nil?
@ui.info "[vagrant-goodhosts] found entry for: #{ip_address} #{hostname}"
@ui.info "[vagrant-goodhosts] - found entry for: #{ip_address} #{hostname}"
if cli.include? ".exe"
stdin, stdout, stderr, wait_thr = Open3.popen3(cli, "a", ip_address, hostname)
else
Expand All @@ -131,7 +131,7 @@ def removeHostEntries
hostnames[ip].each do |hostname|
ip_address = ip
if !ip_address.nil?
@ui.info "[vagrant-goodhosts] remove entry for: #{ip_address} #{hostname}"
@ui.info "[vagrant-goodhosts] - remove entry for: #{ip_address} #{hostname}"
if cli.include? ".exe"
stdin, stdout, stderr, wait_thr = Open3.popen3(cli, "r", ip_address, hostname)
else
Expand All @@ -150,11 +150,11 @@ def removeHostEntries
def printReadme(error, errorText)
if error
cli = get_cli
@ui.error "[vagrant-goodhosts] Issue on executing goodhosts: #{errorText}"
@ui.error "[vagrant-goodhosts] Cli path: #{cli}"
@ui.error "[vagrant-goodhosts] Check the readme at https://github.com/Mte90/vagrant-goodhosts#passwordless-sudo"
@ui.error "[vagrant-goodhosts] Issue executing goodhosts CLI: #{errorText}"
@ui.error "[vagrant-goodhosts] Cli path: #{cli}"
@ui.error "[vagrant-goodhosts] Check the readme at https://github.com/goodhosts/vagrant#passwordless-sudo"
end

end

end
Expand Down

0 comments on commit c0107ef

Please sign in to comment.