lib/command/base.rb in cpl-1.0.0 vs lib/command/base.rb in cpl-1.0.1
- old
+ new
@@ -208,10 +208,10 @@
def latest_image_from(items, app_name: config.app, name_only: true)
matching_items = items.filter { |item| item["name"].start_with?("#{app_name}:") }
# Or special string to indicate no image available
if matching_items.empty?
- "#{app_name}:#{NO_IMAGE_AVAILABLE}"
+ name_only ? "#{app_name}:#{NO_IMAGE_AVAILABLE}" : nil
else
latest_item = matching_items.max_by { |item| extract_image_number(item["name"]) }
name_only ? latest_item["name"] : latest_item
end
end