Check for filter versions and break up box output
This commit is contained in:
parent
baa24af179
commit
8b0790168b
@ -54,7 +54,7 @@ module VagrantPlugins
|
||||
access_token: access_token
|
||||
)
|
||||
with_box(account: account, org: org, box: box_name) do |box|
|
||||
if box && options[:versions]
|
||||
if box && !Array(options[:versions]).empty?
|
||||
box = box.versions.find_all{ |v| options[:versions].include?(v.version) }
|
||||
else
|
||||
box = [box]
|
||||
@ -63,6 +63,7 @@ module VagrantPlugins
|
||||
if !box.empty?
|
||||
box.each do |b|
|
||||
format_box_results(b, @env)
|
||||
@env.ui.output("")
|
||||
end
|
||||
0
|
||||
else
|
||||
|
||||
@ -23,6 +23,7 @@ describe VagrantPlugins::CloudCommand::BoxCommand::Command::Show do
|
||||
allow(ui).to receive(:warn)
|
||||
allow(ui).to receive(:success)
|
||||
allow(ui).to receive(:error)
|
||||
allow(ui).to receive(:output)
|
||||
allow(env).to receive(:ui).and_return(ui)
|
||||
allow(VagrantCloud::Account).to receive(:new).
|
||||
with(custom_server: anything, access_token: access_token).
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user