Don't get synopsis for subcommands

This commit is contained in:
sophia 2021-04-13 14:36:18 -05:00 committed by Paul Hinze
parent 261fa5bbae
commit 0414be7cf7
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -40,16 +40,21 @@ module VagrantPlugins
}
end
plugin = Vagrant::Plugin::V2::Plugin.manager.commands[plugin_name.to_sym].to_a.first
if !plugin
raise "Failed to locate command plugin for: #{plugin_name}"
if info.command.empty?
plugin = Vagrant::Plugin::V2::Plugin.manager.commands[plugin_name.to_sym].to_a.first
if !plugin
raise "Failed to locate command plugin for: #{plugin_name}"
end
klass = plugin.call
synopsis = klass.synopsis
else
synopsis = ""
end
klass = plugin.call
SDK::Command::CommandInfoResp.new(
help: hlp_msg,
flags: flags,
synopsis: klass.synopsis,
synopsis: synopsis,
)
end
end