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