Remove option parser modifications for storing flags

This commit is contained in:
Chris Roberts 2021-01-26 16:38:47 -08:00 committed by Paul Hinze
parent 1109d89616
commit 02b08ac12c
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -24,29 +24,11 @@ module Vagrant
attr_reader :flags
def initialize(*_)
@flags = []
super
Vagrant.default_cli_options.each do |opt_proc|
opt_proc.call(self)
end
end
def on(*opts, &block)
super
# TODO: make this not a disaster
if opts[0][0,2] == "--"
ln = opts[0].split(" ")[0][2..-1]
else
ln = opts[1].split(" ")[0][2..-1]
end
@flags.append(
{
long_name: ln,
description: opts[-1],
type: String
}
)
end
end
end