| 
									
										
										
										
											2023-03-06 09:49:53 -08:00
										 |  |  | # typed: true | 
					
						
							| 
									
										
										
										
											2019-04-19 15:38:03 +09:00
										 |  |  | # frozen_string_literal: true | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 18:25:08 +09:00
										 |  |  | require "cli/parser" | 
					
						
							| 
									
										
										
										
											2020-07-02 12:53:52 +01:00
										 |  |  | require "formula_installer" | 
					
						
							|  |  |  | require "install" | 
					
						
							|  |  |  | require "upgrade" | 
					
						
							| 
									
										
										
										
											2020-07-06 12:49:20 -04:00
										 |  |  | require "cask/cmd" | 
					
						
							|  |  |  | require "cask/utils" | 
					
						
							| 
									
										
										
										
											2023-03-07 22:17:02 +09:00
										 |  |  | require "cask/upgrade" | 
					
						
							| 
									
										
										
										
											2020-07-06 12:49:20 -04:00
										 |  |  | require "cask/macos" | 
					
						
							| 
									
										
										
										
											2021-08-06 02:30:44 -04:00
										 |  |  | require "api" | 
					
						
							| 
									
										
										
										
											2011-08-23 23:30:52 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-18 22:41:47 -05:00
										 |  |  | module Homebrew | 
					
						
							| 
									
										
										
										
											2020-10-20 12:03:48 +02:00
										 |  |  |   extend T::Sig | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-26 01:44:51 +02:00
										 |  |  |   module_function | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-20 12:03:48 +02:00
										 |  |  |   sig { returns(CLI::Parser) } | 
					
						
							| 
									
										
										
										
											2019-01-29 19:52:06 +05:30
										 |  |  |   def upgrade_args | 
					
						
							|  |  |  |     Homebrew::CLI::Parser.new do | 
					
						
							| 
									
										
										
										
											2021-01-15 15:04:02 -05:00
										 |  |  |       description <<~EOS | 
					
						
							| 
									
										
										
										
											2020-08-06 09:25:45 +01:00
										 |  |  |         Upgrade outdated casks and outdated, unpinned formulae using the same options they were originally | 
					
						
							|  |  |  |         installed with, plus any appended brew formula options. If <cask> or <formula> are specified, | 
					
						
							|  |  |  |         upgrade only the given <cask> or <formula> kegs (unless they are pinned; see `pin`, `unpin`). | 
					
						
							| 
									
										
										
										
											2019-01-29 19:52:06 +05:30
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-25 09:10:59 +00:00
										 |  |  |         Unless `HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK` is set, `brew upgrade` or `brew reinstall` will be run for | 
					
						
							|  |  |  |         outdated dependents and dependents with broken linkage, respectively. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-20 00:04:14 -04:00
										 |  |  |         Unless `HOMEBREW_NO_INSTALL_CLEANUP` is set, `brew cleanup` will then be run for the | 
					
						
							| 
									
										
										
										
											2019-08-06 13:23:19 -04:00
										 |  |  |         upgraded formulae or, every 30 days, for all formulae. | 
					
						
							| 
									
										
										
										
											2019-01-29 19:52:06 +05:30
										 |  |  |       EOS | 
					
						
							| 
									
										
										
										
											2020-07-30 18:40:10 +02:00
										 |  |  |       switch "-d", "--debug", | 
					
						
							| 
									
										
										
										
											2022-06-28 10:09:59 +01:00
										 |  |  |              description: "If brewing fails, open an interactive debugging session with access to IRB " \ | 
					
						
							| 
									
										
										
										
											2019-08-06 14:22:24 -04:00
										 |  |  |                           "or a shell inside the temporary build directory." | 
					
						
							| 
									
										
										
										
											2020-07-27 03:59:52 +02:00
										 |  |  |       switch "-f", "--force", | 
					
						
							| 
									
										
										
										
											2022-06-28 10:09:59 +01:00
										 |  |  |              description: "Install formulae without checking for previously installed keg-only or " \ | 
					
						
							|  |  |  |                           "non-migrated versions. When installing casks, overwrite existing files " \ | 
					
						
							| 
									
										
										
										
											2021-01-07 21:23:06 +00:00
										 |  |  |                           "(binaries and symlinks are excluded, unless originally from the same cask)." | 
					
						
							| 
									
										
										
										
											2020-07-30 18:40:10 +02:00
										 |  |  |       switch "-v", "--verbose", | 
					
						
							| 
									
										
										
										
											2019-04-30 08:44:35 +01:00
										 |  |  |              description: "Print the verification and postinstall steps." | 
					
						
							| 
									
										
										
										
											2019-08-21 12:42:09 -04:00
										 |  |  |       switch "-n", "--dry-run", | 
					
						
							| 
									
										
										
										
											2019-07-26 22:55:16 -07:00
										 |  |  |              description: "Show what would be upgraded, but do not actually upgrade anything." | 
					
						
							| 
									
										
										
										
											2020-10-08 11:18:24 +02:00
										 |  |  |       [ | 
					
						
							|  |  |  |         [:switch, "--formula", "--formulae", { | 
					
						
							| 
									
										
										
										
											2020-12-20 13:42:53 -05:00
										 |  |  |           description: "Treat all named arguments as formulae. If no named arguments " \ | 
					
						
							| 
									
										
										
										
											2020-10-08 11:18:24 +02:00
										 |  |  |                        "are specified, upgrade only outdated formulae.", | 
					
						
							|  |  |  |         }], | 
					
						
							|  |  |  |         [:switch, "-s", "--build-from-source", { | 
					
						
							|  |  |  |           description: "Compile <formula> from source even if a bottle is available.", | 
					
						
							|  |  |  |         }], | 
					
						
							|  |  |  |         [:switch, "-i", "--interactive", { | 
					
						
							| 
									
										
										
										
											2022-06-28 10:09:59 +01:00
										 |  |  |           description: "Download and patch <formula>, then open a shell. This allows the user to " \ | 
					
						
							|  |  |  |                        "run `./configure --help` and otherwise determine how to turn the software " \ | 
					
						
							| 
									
										
										
										
											2020-11-12 10:40:41 -05:00
										 |  |  |                        "package into a Homebrew package.", | 
					
						
							| 
									
										
										
										
											2020-10-08 11:18:24 +02:00
										 |  |  |         }], | 
					
						
							|  |  |  |         [:switch, "--force-bottle", { | 
					
						
							| 
									
										
										
										
											2022-06-28 10:09:59 +01:00
										 |  |  |           description: "Install from a bottle if it exists for the current or newest version of " \ | 
					
						
							| 
									
										
										
										
											2020-10-08 11:18:24 +02:00
										 |  |  |                        "macOS, even if it would not normally be used for installation.", | 
					
						
							|  |  |  |         }], | 
					
						
							|  |  |  |         [:switch, "--fetch-HEAD", { | 
					
						
							| 
									
										
										
										
											2022-06-28 10:09:59 +01:00
										 |  |  |           description: "Fetch the upstream repository to detect if the HEAD installation of the " \ | 
					
						
							|  |  |  |                        "formula is outdated. Otherwise, the repository's HEAD will only be checked for " \ | 
					
						
							| 
									
										
										
										
											2020-10-08 11:18:24 +02:00
										 |  |  |                        "updates when a new stable or development version has been released.", | 
					
						
							|  |  |  |         }], | 
					
						
							|  |  |  |         [:switch, "--ignore-pinned", { | 
					
						
							|  |  |  |           description: "Set a successful exit status even if pinned formulae are not upgraded.", | 
					
						
							|  |  |  |         }], | 
					
						
							|  |  |  |         [:switch, "--keep-tmp", { | 
					
						
							|  |  |  |           description: "Retain the temporary files created during installation.", | 
					
						
							|  |  |  |         }], | 
					
						
							| 
									
										
										
										
											2022-07-26 12:15:53 +01:00
										 |  |  |         [:switch, "--debug-symbols", { | 
					
						
							|  |  |  |           depends_on:  "--build-from-source", | 
					
						
							| 
									
										
										
										
											2023-02-10 23:15:40 -05:00
										 |  |  |           description: "Generate debug symbols on build. Source will be retained in a cache directory.", | 
					
						
							| 
									
										
										
										
											2022-07-26 12:15:53 +01:00
										 |  |  |         }], | 
					
						
							| 
									
										
										
										
											2020-10-08 11:18:24 +02:00
										 |  |  |         [:switch, "--display-times", { | 
					
						
							|  |  |  |           env:         :display_install_times, | 
					
						
							| 
									
										
										
										
											2021-09-02 08:42:48 -07:00
										 |  |  |           description: "Print install times for each package at the end of the run.", | 
					
						
							| 
									
										
										
										
											2020-10-08 11:18:24 +02:00
										 |  |  |         }], | 
					
						
							| 
									
										
										
										
											2022-10-08 01:08:15 +01:00
										 |  |  |       ].each do |args| | 
					
						
							|  |  |  |         options = args.pop | 
					
						
							|  |  |  |         send(*args, **options) | 
					
						
							|  |  |  |         conflicts "--cask", args.last | 
					
						
							| 
									
										
										
										
											2020-09-28 02:34:14 +02:00
										 |  |  |       end | 
					
						
							| 
									
										
										
										
											2020-10-03 02:45:32 +02:00
										 |  |  |       formula_options | 
					
						
							| 
									
										
										
										
											2020-10-08 11:18:24 +02:00
										 |  |  |       [ | 
					
						
							|  |  |  |         [:switch, "--cask", "--casks", { | 
					
						
							|  |  |  |           description: "Treat all named arguments as casks. If no named arguments " \ | 
					
						
							|  |  |  |                        "are specified, upgrade only outdated casks.", | 
					
						
							|  |  |  |         }], | 
					
						
							| 
									
										
										
										
											2023-03-09 20:35:53 +09:00
										 |  |  |         [:switch, "--skip-cask-deps", { | 
					
						
							|  |  |  |           description: "Skip installing cask dependencies.", | 
					
						
							|  |  |  |         }], | 
					
						
							|  |  |  |         [:switch, "-g", "--greedy", { | 
					
						
							|  |  |  |           description: "Also include casks with `auto_updates true` or `version :latest`.", | 
					
						
							|  |  |  |         }], | 
					
						
							|  |  |  |         [:switch, "--greedy-latest", { | 
					
						
							|  |  |  |           description: "Also include casks with `version :latest`.", | 
					
						
							|  |  |  |         }], | 
					
						
							|  |  |  |         [:switch, "--greedy-auto-updates", { | 
					
						
							|  |  |  |           description: "Also include casks with `auto_updates true`.", | 
					
						
							|  |  |  |         }], | 
					
						
							| 
									
										
										
										
											2022-10-08 01:08:15 +01:00
										 |  |  |         *Cask::Cmd::AbstractCommand::OPTIONS.map(&:dup), | 
					
						
							|  |  |  |       ].each do |args| | 
					
						
							|  |  |  |         options = args.pop | 
					
						
							|  |  |  |         send(*args, **options) | 
					
						
							|  |  |  |         conflicts "--formula", args.last | 
					
						
							| 
									
										
										
										
											2020-08-06 09:25:45 +01:00
										 |  |  |       end | 
					
						
							| 
									
										
										
										
											2020-10-03 02:45:32 +02:00
										 |  |  |       cask_options | 
					
						
							| 
									
										
										
										
											2020-10-08 11:18:24 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |       conflicts "--build-from-source", "--force-bottle" | 
					
						
							| 
									
										
										
										
											2021-01-10 14:26:40 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-01-05 22:44:39 -05:00
										 |  |  |       named_args [:outdated_formula, :outdated_cask] | 
					
						
							| 
									
										
										
										
											2019-01-29 19:52:06 +05:30
										 |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-16 01:52:57 +01:00
										 |  |  |   sig { void } | 
					
						
							| 
									
										
										
										
											2011-08-23 23:30:52 +01:00
										 |  |  |   def upgrade | 
					
						
							| 
									
										
										
										
											2020-07-25 03:48:33 +02:00
										 |  |  |     args = upgrade_args.parse | 
					
						
							| 
									
										
										
										
											2019-02-04 08:38:24 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-12-17 21:14:18 +09:00
										 |  |  |     formulae, casks = args.named.to_resolved_formulae_to_casks | 
					
						
							| 
									
										
										
										
											2020-07-27 12:48:42 -07:00
										 |  |  |     # If one or more formulae are specified, but no casks were | 
					
						
							|  |  |  |     # specified, we want to make note of that so we don't | 
					
						
							|  |  |  |     # try to upgrade all outdated casks. | 
					
						
							| 
									
										
										
										
											2021-01-11 11:43:11 -08:00
										 |  |  |     only_upgrade_formulae = formulae.present? && casks.blank? | 
					
						
							|  |  |  |     only_upgrade_casks = casks.present? && formulae.blank? | 
					
						
							| 
									
										
										
										
											2020-07-06 17:23:31 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-02 08:42:48 -07:00
										 |  |  |     upgrade_outdated_formulae(formulae, args: args) unless only_upgrade_casks | 
					
						
							|  |  |  |     upgrade_outdated_casks(casks, args: args) unless only_upgrade_formulae | 
					
						
							| 
									
										
										
										
											2021-01-11 11:43:11 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-07-20 08:24:55 -07:00
										 |  |  |     Cleanup.periodic_clean!(dry_run: args.dry_run?) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-02 08:42:48 -07:00
										 |  |  |     Homebrew.messages.display_messages(display_times: args.display_times?) | 
					
						
							| 
									
										
										
										
											2020-07-06 17:23:31 -04:00
										 |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-06 09:49:53 -08:00
										 |  |  |   sig { params(formulae: T::Array[Formula], args: T.untyped).returns(T::Boolean) } | 
					
						
							| 
									
										
										
										
											2020-07-28 12:55:46 +02:00
										 |  |  |   def upgrade_outdated_formulae(formulae, args:) | 
					
						
							| 
									
										
										
										
											2021-01-11 11:43:11 -08:00
										 |  |  |     return false if args.cask? | 
					
						
							| 
									
										
										
										
											2020-08-07 10:25:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-17 14:33:53 +00:00
										 |  |  |     if args.build_from_source? | 
					
						
							|  |  |  |       unless DevelopmentTools.installed? | 
					
						
							|  |  |  |         raise BuildFlagsError.new(["--build-from-source"], bottled: formulae.all?(&:bottled?)) | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       unless Homebrew::EnvConfig.developer? | 
					
						
							|  |  |  |         opoo "building from source is not supported!" | 
					
						
							|  |  |  |         puts "You're on your own. Failures are expected so don't create any issues, please!" | 
					
						
							|  |  |  |       end | 
					
						
							| 
									
										
										
										
											2021-03-22 16:11:27 +00:00
										 |  |  |     end | 
					
						
							| 
									
										
										
										
											2015-06-29 14:09:57 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-27 11:37:07 +02:00
										 |  |  |     Install.perform_preinstall_checks | 
					
						
							| 
									
										
										
										
											2011-08-23 23:30:52 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-06 17:23:31 -04:00
										 |  |  |     if formulae.blank? | 
					
						
							| 
									
										
										
										
											2016-07-22 12:47:47 +03:00
										 |  |  |       outdated = Formula.installed.select do |f| | 
					
						
							| 
									
										
										
										
											2019-01-29 19:52:06 +05:30
										 |  |  |         f.outdated?(fetch_head: args.fetch_HEAD?) | 
					
						
							| 
									
										
										
										
											2016-07-22 12:47:47 +03:00
										 |  |  |       end | 
					
						
							| 
									
										
										
										
											2016-08-05 22:01:32 +08:00
										 |  |  |     else | 
					
						
							| 
									
										
										
										
											2020-07-06 12:49:20 -04:00
										 |  |  |       outdated, not_outdated = formulae.partition do |f| | 
					
						
							| 
									
										
										
										
											2019-01-29 19:52:06 +05:30
										 |  |  |         f.outdated?(fetch_head: args.fetch_HEAD?) | 
					
						
							| 
									
										
										
										
											2016-07-22 12:47:47 +03:00
										 |  |  |       end | 
					
						
							| 
									
										
										
										
											2015-01-03 17:59:40 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-06 12:49:20 -04:00
										 |  |  |       not_outdated.each do |f| | 
					
						
							| 
									
										
										
										
											2016-09-10 10:24:57 +01:00
										 |  |  |         versions = f.installed_kegs.map(&:version) | 
					
						
							| 
									
										
										
										
											2016-08-05 22:01:32 +08:00
										 |  |  |         if versions.empty? | 
					
						
							| 
									
										
										
										
											2019-11-12 16:18:54 -08:00
										 |  |  |           ofail "#{f.full_specified_name} not installed" | 
					
						
							| 
									
										
										
										
											2016-08-05 22:01:32 +08:00
										 |  |  |         else | 
					
						
							| 
									
										
										
										
											2015-11-29 15:37:06 +08:00
										 |  |  |           version = versions.max | 
					
						
							| 
									
										
										
										
											2019-11-12 16:18:54 -08:00
										 |  |  |           opoo "#{f.full_specified_name} #{version} already installed" | 
					
						
							| 
									
										
										
										
											2012-03-07 11:17:36 +00:00
										 |  |  |         end | 
					
						
							| 
									
										
										
										
											2011-09-02 09:55:37 +01:00
										 |  |  |       end | 
					
						
							| 
									
										
										
										
											2011-08-23 23:30:52 +01:00
										 |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-01-11 11:43:11 -08:00
										 |  |  |     return false if outdated.blank? | 
					
						
							| 
									
										
										
										
											2020-07-06 12:49:20 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-05 09:31:17 +00:00
										 |  |  |     pinned = outdated.select(&:pinned?) | 
					
						
							|  |  |  |     outdated -= pinned | 
					
						
							| 
									
										
										
										
											2020-11-05 20:33:51 +00:00
										 |  |  |     formulae_to_install = outdated.map do |f| | 
					
						
							|  |  |  |       f_latest = f.latest_formula | 
					
						
							|  |  |  |       if f_latest.latest_version_installed? | 
					
						
							|  |  |  |         f | 
					
						
							|  |  |  |       else | 
					
						
							|  |  |  |         f_latest | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2016-09-15 16:01:18 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-29 19:52:06 +05:30
										 |  |  |     if !pinned.empty? && !args.ignore_pinned? | 
					
						
							| 
									
										
										
										
											2023-02-27 20:16:34 -08:00
										 |  |  |       ofail "Not upgrading #{pinned.count} pinned #{Utils.pluralize("package", pinned.count)}:" | 
					
						
							| 
									
										
										
										
											2018-03-16 20:31:20 +00:00
										 |  |  |       puts pinned.map { |f| "#{f.full_specified_name} #{f.pkg_version}" } * ", " | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-15 16:01:18 +01:00
										 |  |  |     if formulae_to_install.empty? | 
					
						
							| 
									
										
										
										
											2016-09-10 10:24:57 +01:00
										 |  |  |       oh1 "No packages to upgrade" | 
					
						
							|  |  |  |     else | 
					
						
							| 
									
										
										
										
											2019-07-28 14:50:59 +01:00
										 |  |  |       verb = args.dry_run? ? "Would upgrade" : "Upgrading" | 
					
						
							| 
									
										
										
										
											2023-02-27 20:49:02 -08:00
										 |  |  |       oh1 "#{verb} #{formulae_to_install.count} outdated #{Utils.pluralize("package", formulae_to_install.count)}:" | 
					
						
							| 
									
										
										
										
											2018-03-30 15:00:45 +01:00
										 |  |  |       formulae_upgrades = formulae_to_install.map do |f| | 
					
						
							|  |  |  |         if f.optlinked? | 
					
						
							|  |  |  |           "#{f.full_specified_name} #{Keg.new(f.opt_prefix).version} -> #{f.pkg_version}" | 
					
						
							|  |  |  |         else | 
					
						
							|  |  |  |           "#{f.full_specified_name} #{f.pkg_version}" | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |       end | 
					
						
							| 
									
										
										
										
											2019-09-09 12:03:19 +02:00
										 |  |  |       puts formulae_upgrades.join("\n") | 
					
						
							| 
									
										
										
										
											2014-01-25 06:30:46 +01:00
										 |  |  |     end | 
					
						
							| 
									
										
										
										
											2013-05-18 22:09:15 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-31 12:27:14 -04:00
										 |  |  |     Upgrade.upgrade_formulae( | 
					
						
							|  |  |  |       formulae_to_install, | 
					
						
							|  |  |  |       flags:                      args.flags_only, | 
					
						
							|  |  |  |       dry_run:                    args.dry_run?, | 
					
						
							|  |  |  |       installed_on_request:       args.named.present?, | 
					
						
							|  |  |  |       force_bottle:               args.force_bottle?, | 
					
						
							|  |  |  |       build_from_source_formulae: args.build_from_source_formulae, | 
					
						
							|  |  |  |       interactive:                args.interactive?, | 
					
						
							|  |  |  |       keep_tmp:                   args.keep_tmp?, | 
					
						
							| 
									
										
										
										
											2022-07-26 12:15:53 +01:00
										 |  |  |       debug_symbols:              args.debug_symbols?, | 
					
						
							| 
									
										
										
										
											2021-08-31 12:27:14 -04:00
										 |  |  |       force:                      args.force?, | 
					
						
							|  |  |  |       debug:                      args.debug?, | 
					
						
							|  |  |  |       quiet:                      args.quiet?, | 
					
						
							|  |  |  |       verbose:                    args.verbose?, | 
					
						
							|  |  |  |     ) | 
					
						
							| 
									
										
										
										
											2018-09-12 19:28:02 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-18 14:46:48 +00:00
										 |  |  |     Upgrade.check_installed_dependents( | 
					
						
							|  |  |  |       formulae_to_install, | 
					
						
							|  |  |  |       flags:                      args.flags_only, | 
					
						
							|  |  |  |       dry_run:                    args.dry_run?, | 
					
						
							|  |  |  |       installed_on_request:       args.named.present?, | 
					
						
							|  |  |  |       force_bottle:               args.force_bottle?, | 
					
						
							|  |  |  |       build_from_source_formulae: args.build_from_source_formulae, | 
					
						
							|  |  |  |       interactive:                args.interactive?, | 
					
						
							|  |  |  |       keep_tmp:                   args.keep_tmp?, | 
					
						
							| 
									
										
										
										
											2022-07-26 12:15:53 +01:00
										 |  |  |       debug_symbols:              args.debug_symbols?, | 
					
						
							| 
									
										
										
										
											2021-03-18 14:46:48 +00:00
										 |  |  |       force:                      args.force?, | 
					
						
							|  |  |  |       debug:                      args.debug?, | 
					
						
							|  |  |  |       quiet:                      args.quiet?, | 
					
						
							|  |  |  |       verbose:                    args.verbose?, | 
					
						
							|  |  |  |     ) | 
					
						
							| 
									
										
										
										
											2018-09-12 19:28:02 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-01-11 11:43:11 -08:00
										 |  |  |     true | 
					
						
							| 
									
										
										
										
											2018-09-12 19:28:02 +00:00
										 |  |  |   end | 
					
						
							| 
									
										
										
										
											2020-07-06 12:49:20 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-06 09:49:53 -08:00
										 |  |  |   sig { params(casks: T::Array[Cask::Cask], args: T.untyped).returns(T::Boolean) } | 
					
						
							| 
									
										
										
										
											2020-07-30 18:40:10 +02:00
										 |  |  |   def upgrade_outdated_casks(casks, args:) | 
					
						
							| 
									
										
										
										
											2021-01-11 11:43:11 -08:00
										 |  |  |     return false if args.formula? | 
					
						
							| 
									
										
										
										
											2020-08-07 10:25:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-07 22:17:02 +09:00
										 |  |  |     Cask::Upgrade.upgrade_casks( | 
					
						
							| 
									
										
										
										
											2020-08-05 11:50:01 +02:00
										 |  |  |       *casks, | 
					
						
							| 
									
										
										
										
											2021-09-21 11:45:18 -07:00
										 |  |  |       force:               args.force?, | 
					
						
							|  |  |  |       greedy:              args.greedy?, | 
					
						
							|  |  |  |       greedy_latest:       args.greedy_latest?, | 
					
						
							|  |  |  |       greedy_auto_updates: args.greedy_auto_updates?, | 
					
						
							|  |  |  |       dry_run:             args.dry_run?, | 
					
						
							|  |  |  |       binaries:            args.binaries?, | 
					
						
							|  |  |  |       quarantine:          args.quarantine?, | 
					
						
							|  |  |  |       require_sha:         args.require_sha?, | 
					
						
							|  |  |  |       skip_cask_deps:      args.skip_cask_deps?, | 
					
						
							|  |  |  |       verbose:             args.verbose?, | 
					
						
							|  |  |  |       args:                args, | 
					
						
							| 
									
										
										
										
											2020-08-05 11:50:01 +02:00
										 |  |  |     ) | 
					
						
							| 
									
										
										
										
											2020-07-06 12:49:20 -04:00
										 |  |  |   end | 
					
						
							| 
									
										
										
										
											2011-08-23 23:30:52 +01:00
										 |  |  | end |