diff --git a/plugins/commands/cloud/box/show.rb b/plugins/commands/cloud/box/show.rb index 2a52fc357..bdafc2537 100644 --- a/plugins/commands/cloud/box/show.rb +++ b/plugins/commands/cloud/box/show.rb @@ -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 diff --git a/test/unit/plugins/commands/cloud/box/show_test.rb b/test/unit/plugins/commands/cloud/box/show_test.rb index bd10cba22..623b7a048 100644 --- a/test/unit/plugins/commands/cloud/box/show_test.rb +++ b/test/unit/plugins/commands/cloud/box/show_test.rb @@ -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).