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
This commit is contained in:
sophia 2021-11-18 16:04:27 -06:00 committed by Paul Hinze
parent de996a6047
commit 2513d21054
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -24,7 +24,8 @@ module VagrantPlugins
boxes = @env.boxes.all boxes = @env.boxes.all
if boxes.empty? 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 end
list_boxes(boxes, options[:info]) list_boxes(boxes, options[:info])