Remove option parser modifications for storing flags
This commit is contained in:
parent
1109d89616
commit
02b08ac12c
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user