StringBlockEditor already adds the necessary newlines. That extra
newline was making /etc/exports longer and longer, full of empty lines,
because StringBlockEditor doesn't know about it and does not remove it.
This commit fixes an issue where Gem::Version.new could recieve a nil
value if no addtional box updates are available. For some versions of
ruby, this is actually an error case. This commit fixes that by
converting it to an integer to prevent an exception.
Issue reference: https://github.com/rubygems/rubygems/issues/2359
This commit changes the behavior of `vagrant box outdated --global` so
it gets the latest version for the current machine's provider, rather
than the latest version for any provider.
This commit checks the local box collection to see if the latest box
update has already been downloaded. If it has, Vagrant will display the
destroy/recreate message instead of the "run vagrant update" message.
Prior to this commit, if a user didn't supply a box file on disk or a
box url, Vagrant would crash and display a stacktrace with an invalid
file. This commit fixes that by adding some extra handling around the
arguments supplied to the publish command.
Prior to this commit, the file_checksum class used the `Vagrant::Errors`
class as if it were apart of the Vagrant module. However, since the
file_checksum class is an interface and not part of the Vagrant module,
it doesn't have access to that Error class like other Vagrant modules.
This commit fixes that by ensuring the `"vagrant/errors"` class is
loaded, and that the proper namespace is used.
Check for modinfo in /sbin if it doesn't appear on the PATH.
If it's not found on the PATH or in /sbin, the command will default back to modinfo so the user sees the error message about adding it to their PATH.
This commit adds the machine guest name in the hostname validation error
message so that it's easier to see which guest in a Vagrantfile has the
validation error.
The test "generates a network name and configuration" calls at the end
`process_public_network()`, which can return an empty list if the currently
executing machine has no usable network interfaces (this is typically the case
for workers that build rpm packages in OBS or Koji). This results in an
exception of type Errors::NetworkNoInterfaces to be thrown and causing this test
to fail.
This commit adds a mock of the PrepareNetworks.list_interfaces call that returns
a single entry with just the required defaults.
getent queries the system resolver for the hostname - but it's not
the resolver we're interested in. In fact, the hostname-to-be-set
may already exist in DNS (becuase DNS really is a nifty thing and
can do a lot of things which are not that possible with /etc/hosts
alone), in which case getent will "not fail" and vagrant will believe
the hostname had already been set.
Instead, query hostnamectl for the "static" hostname - that's the
one we will be setting, so we're ok IFF hostnamectl returns exactly
what we would be setting.