Always unload the environment

This commit is contained in:
Mitchell Hashimoto 2013-03-03 00:09:40 -08:00
parent 2431fe73b8
commit 9c7bedfb63
1 changed files with 7 additions and 5 deletions

View File

@ -55,11 +55,13 @@ begin
# If we're not in the installer, warn.
env.ui.warn(I18n.t("vagrant.general.not_in_installer")) if !Vagrant.in_installer?
begin
# Execute the CLI interface, and exit with the proper error code
exit_status = env.cli(ARGV)
ensure
# Unload the environment so cleanup can be done
env.unload
end
# Exit with the exit status from our CLI command
exit(exit_status)