From e95d906f740912a17793d383b736d1dda60ee8b0 Mon Sep 17 00:00:00 2001 From: sophia Date: Tue, 8 Feb 2022 09:31:10 -0600 Subject: [PATCH] Get plugin name from client --- lib/vagrant/guest/remote.rb | 5 +++-- plugins/commands/serve/client/guest.rb | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/guest/remote.rb b/lib/vagrant/guest/remote.rb index c41290114..65103294a 100644 --- a/lib/vagrant/guest/remote.rb +++ b/lib/vagrant/guest/remote.rb @@ -38,6 +38,8 @@ module Vagrant # # @param [Symbol] cap_name Name of the capability def capability(cap_name, *args) + @logger.debug("running name just 'cause:") + @logger.debug("neam is: #{name}") @logger.debug("running remote guest capability #{cap_name} with args #{args}") if !client.has_capability?(cap_name) raise Errors::GuestCapabilityNotFound, @@ -60,8 +62,7 @@ module Vagrant # # @return [Symbol] def name - # TODO: Get name from plugin - "placeholder" + client.name end # Returns the parent of the guest. diff --git a/plugins/commands/serve/client/guest.rb b/plugins/commands/serve/client/guest.rb index eeb9bae37..0cc946eb7 100644 --- a/plugins/commands/serve/client/guest.rb +++ b/plugins/commands/serve/client/guest.rb @@ -20,6 +20,12 @@ module VagrantPlugins def parent run_func end + + # @return [String] plugin name + def name + c = client.name(Empty.new) + c.name + end end end end