From 2513d21054be34b600c6fc16c328416c4b91a897 Mon Sep 17 00:00:00 2001 From: sophia Date: Thu, 18 Nov 2021 16:04:27 -0600 Subject: [PATCH] Return 0 when no boxes are installed Previously the cli returned 1 for `vagrant box list` if there are no installed boxes. This is somewhat misleading since the command completes without an error, it should return 0 --- plugins/commands/box/command/list.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/commands/box/command/list.rb b/plugins/commands/box/command/list.rb index f2a3fed76..3445a00d5 100644 --- a/plugins/commands/box/command/list.rb +++ b/plugins/commands/box/command/list.rb @@ -24,7 +24,8 @@ module VagrantPlugins boxes = @env.boxes.all if boxes.empty? - return @env.ui.warn(I18n.t("vagrant.commands.box.no_installed_boxes"), prefix: false) + @env.ui.warn(I18n.t("vagrant.commands.box.no_installed_boxes"), prefix: false) + return 0 end list_boxes(boxes, options[:info])