Skip to content

Commit

Permalink
Cask: show previous verison in cask upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmarkmartin committed Sep 9, 2018
1 parent 45bbf04 commit 2806136
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Library/Homebrew/cask/cmd/upgrade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ def run

ohai "Casks with `auto_updates` or `version :latest` will not be upgraded" if args.empty? && !greedy?
oh1 "Upgrading #{Formatter.pluralize(outdated_casks.length, "outdated package")}, with result:"
puts outdated_casks.map { |f| "#{f.full_name} #{f.version}" } * ", "
cask_upgrades = outdated_casks.map do |f|
if f.installed_caskfile.nil?
"#{f.full_name} #{f.version}"
else
"#{f.full_name} #{CaskLoader.load(f.installed_caskfile).version} -> #{f.version}"
end
end
puts cask_upgrades.join(", ")

outdated_casks.each do |old_cask|
odebug "Started upgrade process for Cask #{old_cask}"
Expand Down

0 comments on commit 2806136

Please sign in to comment.