diff --git a/internal/core/machine.go b/internal/core/machine.go index 921a3d55a..d01e04287 100644 --- a/internal/core/machine.go +++ b/internal/core/machine.go @@ -36,9 +36,9 @@ func (m *Machine) SetID(value string) (err error) { return m.SaveMachine() } -func (m *Machine) Box() (b *core.Box, err error) { +func (m *Machine) Box() (b core.Box, err error) { var result core.Box - return &result, mapstructure.Decode(m.machine.Box, &result) + return result, mapstructure.Decode(m.machine.Box, &result) } // Guest implements core.Machine diff --git a/internal/server/singleprocess/state/box.go b/internal/server/singleprocess/state/box.go index a810d93bb..d4e57f83f 100644 --- a/internal/server/singleprocess/state/box.go +++ b/internal/server/singleprocess/state/box.go @@ -103,7 +103,6 @@ func (s *State) boxDelete( } return err } - // TODO: should references to the box, say in the machine also be deleted? // Delete the box if err = dbTxn.Bucket(boxBucket).Delete(s.boxId(b)); err != nil { return diff --git a/lib/vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_pb.rb b/lib/vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_pb.rb index 3672748b3..9de7e6373 100644 --- a/lib/vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_pb.rb +++ b/lib/vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_pb.rb @@ -756,7 +756,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :version, :string, 1 end add_message "hashicorp.vagrant.sdk.Box.EqualityResponse" do - optional :result, :bool, 1 + optional :result, :int32, 1 end end end diff --git a/lib/vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb.rb b/lib/vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb.rb index 64cd2bbfa..700dd6b0f 100644 --- a/lib/vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb.rb +++ b/lib/vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb.rb @@ -492,8 +492,7 @@ module Hashicorp rpc :Name, ::Google::Protobuf::Empty, ::Hashicorp::Vagrant::Sdk::Box::NameResponse rpc :Provider, ::Google::Protobuf::Empty, ::Hashicorp::Vagrant::Sdk::Box::ProviderResponse rpc :Version, ::Google::Protobuf::Empty, ::Hashicorp::Vagrant::Sdk::Box::VersionResponse - rpc :GreaterThanOrEqual, ::Hashicorp::Vagrant::Sdk::Args::Box, ::Hashicorp::Vagrant::Sdk::Box::EqualityResponse - rpc :LessThan, ::Hashicorp::Vagrant::Sdk::Args::Box, ::Hashicorp::Vagrant::Sdk::Box::EqualityResponse + rpc :Compare, ::Hashicorp::Vagrant::Sdk::Args::Box, ::Hashicorp::Vagrant::Sdk::Box::EqualityResponse end Stub = Service.rpc_stub_class