Commit Graph

6 Commits

Author SHA1 Message Date
Brian Cain 5fa3c5866c
Ensure tmp dir for validate is removed once command exits 2018-12-03 14:50:20 -08:00
Brian Cain 69eacd2b73
Remove machine from initialize method 2018-11-30 11:03:05 -08:00
Brian Cain 68dda8f853
Fixes #10224: Clear our registered providers when validating configs with no provider
Prior to this commit, if you went to validate your Vagrantfile and
wanted to ignore the provider, Vagrant would still fail as it checks if
there are any registered providers that are installed and usable. This
commit mocks out all registered providers to bypass that for the
validate command so that Vagrant can just validate the config and ignore
any provider config blocks.
2018-11-30 10:54:16 -08:00
Brian Cain 6051f3598e
Fixes #10224: Allow validation of config while ignoring provider
This commit adds a new flag to the `vagrant validate` command which
allows users to completely ignore the provider block of a config file.
This is useful for when you are running `vagrant validate` in CI and
don't want to install a valid provider to check the syntax of your
Vagratnfile. When the flag is invoked, a warning will be displayed
saying that the provider block will be ignored and not validated.
2018-10-30 13:37:22 -07:00
Brian Cain 4bd95cbfe2 (#8864) Improve `vagrant validate` command
Prior to this commit, the `vagrant validate` command would only validate
the first machine in a vagrant file. This commit improves that by
validating all known machines in the environment. If one is not found,
it will properly throw an exception instead of a stacktrace.
2017-08-15 13:53:45 -07:00
Hasyimi Bahrudin cbda9f0906 Add validate command for validating Vagrantfile 2017-02-07 13:43:49 +08:00