Chris Roberts 6c1a9dc58e Store box metadata of active guest
When a guest is created, the box metadata information is stored in the
machine data directory. This allows modifications to happen to the
Vagrantfile definition of the box in use (box name change, box version
change, etc) while still allowing the Machine instance of an active
guest successfully load the box currently backing it.
2018-08-02 11:01:36 -07:00

23 lines
530 B
Ruby

require "vagrant"
module VagrantPlugins
module CommandUp
class Plugin < Vagrant.plugin("2")
name "up command"
description <<-DESC
The `up` command brings the virtual environment up and running.
DESC
command("up") do
require File.expand_path("../command", __FILE__)
Command
end
action_hook(:store_box_metadata, :machine_action_up) do |hook|
require_relative "middleware/store_box_metadata"
hook.append(StoreBoxMetadata)
end
end
end
end