Beispiel #1
0
// reload runs 'vagrant reload --provision'
func reload(ccmd *cobra.Command, args []string) {

	// PreRun: initialize

	//
	fmt.Printf(stylish.Bullet("Reloading nanobox..."))
	fmt.Printf(stylish.Bullet("Nanobox may require admin privileges to modify your /etc/hosts file and /etc/exports."))
	if err := vagrant.Reload(); err != nil {
		vagrant.Fatal("[commands/reload] vagrant.Reload() failed", err.Error())
	}

	// indeicate that the VM has recently been reloaded
	config.VMfile.ReloadedIs(true)
}
Beispiel #2
0
// reload runs 'vagrant reload --provision'
func reload(ccmd *cobra.Command, args []string) {

	// PreRun: initialize

	// generate a new Vagrantfile on reload; this is done because there may be times
	// when a user needs a new Vagrantfile (ie. adding a custom engine after the VM
	// already exists). The only way to accomplish this otherwise is either destroying
	// the VM entirely or running the hidden "nanobox init -f"
	Vagrant.Init()

	//
	fmt.Printf(stylish.Bullet("Reloading nanobox..."))
	fmt.Printf(stylish.Bullet("Nanobox may require admin privileges to modify your /etc/hosts and /etc/exports files."))
	if err := vagrant.Reload(); err != nil {
		vagrant.Fatal("[commands/reload] vagrant.Reload() failed", err.Error())
	}

	// indeicate that the VM has recently been reloaded
	config.VMfile.ReloadedIs(true)
}