mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-05-28 04:36:05 -04:00
Just get the flag names
This commit is contained in:
parent
dc64d85adf
commit
854a2a4022
2 changed files with 1 additions and 7 deletions
|
|
@ -20,9 +20,6 @@ module Vagrant
|
|||
# outside of command implementations to the local option
|
||||
# parser instances in use
|
||||
class OptionParser < ::OptionParser
|
||||
|
||||
attr_reader :flags
|
||||
|
||||
def initialize(*_)
|
||||
super
|
||||
Vagrant.default_cli_options.each do |opt_proc|
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ module VagrantPlugins
|
|||
}.map { |o|
|
||||
Hashicorp::Vagrant::Sdk::Command::Flag.new(
|
||||
description: o.desc.join(" "),
|
||||
long_name: o.long.first,
|
||||
long_name: o.switch_name,
|
||||
short_name: o.short.first,
|
||||
type: o.is_a?(OptionParser::Switch::NoArgument) ?
|
||||
Hashicorp::Vagrant::Sdk::Command::Flag::Type::BOOL :
|
||||
|
|
@ -50,9 +50,6 @@ module VagrantPlugins
|
|||
)
|
||||
}
|
||||
|
||||
# Clean our option data out of the thread
|
||||
Thread.current.thread_variable_set(:command_options, nil)
|
||||
|
||||
Hashicorp::Vagrant::Sdk::Command::FlagsResp.new(
|
||||
flags: flags
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue