From 854a2a4022aa22e5437ac457df13d04e830d10d0 Mon Sep 17 00:00:00 2001 From: sophia Date: Wed, 27 Jan 2021 10:56:45 -0600 Subject: [PATCH] Just get the flag names --- lib/vagrant.rb | 3 --- plugins/commands/serve/service/command_service.rb | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/vagrant.rb b/lib/vagrant.rb index 51b492cf3..c60a3c717 100644 --- a/lib/vagrant.rb +++ b/lib/vagrant.rb @@ -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| diff --git a/plugins/commands/serve/service/command_service.rb b/plugins/commands/serve/service/command_service.rb index 9b09b1924..6e4191bed 100644 --- a/plugins/commands/serve/service/command_service.rb +++ b/plugins/commands/serve/service/command_service.rb @@ -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 )