From b5c7444ec04d39e97b6c55be6f67954f12998e68 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Thu, 9 May 2024 14:33:39 +0000 Subject: [PATCH] docs: updates from Homebrew/brew --- docs/Cask/Installer.html | 234 +- docs/FormulaInstaller.html | 54 +- docs/GitHub/Actions.html | 203 +- docs/GitHub/Actions/Annotation.html | 66 +- docs/Homebrew/DevCmd/Audit.html | 2 +- docs/Homebrew/DevCmd/PrPull.html | 2 +- docs/Homebrew/Diagnostic/Checks.html | 6 +- docs/Homebrew/Style.html | 2 +- docs/Kernel.html | 420 +-- docs/method_list.html | 4314 +++++++++++++------------- 10 files changed, 2768 insertions(+), 2535 deletions(-) diff --git a/docs/Cask/Installer.html b/docs/Cask/Installer.html index b8b15737b..df7009c6e 100644 --- a/docs/Cask/Installer.html +++ b/docs/Cask/Installer.html @@ -1581,13 +1581,13 @@
+434 435 436 -437 -438+437
# File 'cask/installer.rb', line 435 +# File 'cask/installer.rb', line 434 def backup @cask.staged_path.rename backup_path @@ -1627,14 +1627,14 @@
+520 521 522 523 -524 -525+524
# File 'cask/installer.rb', line 521 +# File 'cask/installer.rb', line 520 def return if @cask..nil? @@ -1675,14 +1675,14 @@
+514 515 516 517 -518 -519+518
# File 'cask/installer.rb', line 515 +# File 'cask/installer.rb', line 514 def backup_path return if @cask.staged_path.nil? @@ -1789,6 +1789,7 @@
+302 303 304 305 @@ -1804,11 +1805,10 @@+318315 316 317 -318 -319
# File 'cask/installer.rb', line 303 +# File 'cask/installer.rb', line 302 def cask_and_formula_dependencies return @cask_and_formula_dependencies if @cask_and_formula_dependencies @@ -1861,12 +1861,12 @@
+379 380 -381 -382+381
# File 'cask/installer.rb', line 380 +# File 'cask/installer.rb', line 379 def caveats self.class.caveats(@cask) @@ -1918,6 +1918,7 @@
+287 288 289 290 @@ -1930,11 +1931,10 @@+300297 298 299 -300 -301
# File 'cask/installer.rb', line 288 +# File 'cask/installer.rb', line 287 def check_arch_requirements return if @cask.depends_on.arch.nil? @@ -1984,6 +1984,7 @@
+146 147 148 149 @@ -1997,11 +1998,10 @@+160157 158 159 -160 -161
# File 'cask/installer.rb', line 147 +# File 'cask/installer.rb', line 146 def check_conflicts return unless @cask.conflicts_with @@ -2066,8 +2066,7 @@+144141 142 143 -144 -145
# File 'cask/installer.rb', line 130 @@ -2081,10 +2080,9 @@@@ -2135,15 +2133,15 @@case deprecate_disable_type when :deprecated - puts "::warning::#{}" if ENV["GITHUB_ACTIONS"] opoo when :disabled - puts "::error::#{}" if ENV["GITHUB_ACTIONS"] + GitHub::Actions.puts_annotation_if_env_set(:error, ) raise CaskCannotBeInstalledError.new(@cask, ) end end
+280 281 282 283 284 -285 -286+285
# File 'cask/installer.rb', line 281 +# File 'cask/installer.rb', line 280 def check_macos_requirements return unless @cask.depends_on.macos @@ -2185,13 +2183,13 @@
+275 276 277 -278 -279+278
# File 'cask/installer.rb', line 276 +# File 'cask/installer.rb', line 275 def check_requirements check_macos_requirements @@ -2274,14 +2272,14 @@
+184 185 186 187 -188 -189+188
# File 'cask/installer.rb', line 185 +# File 'cask/installer.rb', line 184 def download(quiet: nil, timeout: nil) # Store cask download path in cask to prevent multiple downloads in a row when checking if it's outdated @@ -2335,12 +2333,12 @@
+179 180 -181 -182+181
# File 'cask/installer.rb', line 180 +# File 'cask/installer.rb', line 179 def downloader @downloader ||= Download.new(@cask, quarantine: quarantine?) @@ -2379,6 +2377,7 @@
+207 208 209 210 @@ -2403,11 +2402,10 @@+232229 230 231 -232 -233
# File 'cask/installer.rb', line 208 +# File 'cask/installer.rb', line 207 def extract_primary_container(to: @cask.staged_path) odebug "Extracting primary container" @@ -2565,16 +2563,16 @@
+456 457 458 459 460 461 -462 -463+462
# File 'cask/installer.rb', line 457 +# File 'cask/installer.rb', line 456 def finalize_upgrade ohai "Purging files for version #{@cask.version} of Cask #{@cask}" @@ -2630,6 +2628,7 @@
+614 615 616 617 @@ -2684,11 +2683,10 @@+669666 667 668 -669 -670
# File 'cask/installer.rb', line 615 +# File 'cask/installer.rb', line 614 def forbidden_cask_and_formula_check forbidden_formulae = Set.new(Homebrew::EnvConfig.forbidden_formulae.to_s.split) @@ -2793,6 +2791,7 @@
+575 576 577 578 @@ -2828,11 +2827,10 @@+611608 609 610 -611 -612
# File 'cask/installer.rb', line 576 +# File 'cask/installer.rb', line 575 def forbidden_tap_check return if Tap.allowed_taps.blank? && Tap.forbidden_taps.blank? @@ -2958,12 +2956,12 @@
+526 527 -528 -529+528
# File 'cask/installer.rb', line 527 +# File 'cask/installer.rb', line 526 def (path) Utils.(path, command: @command) @@ -3137,6 +3135,7 @@
+235 236 237 238 @@ -3174,11 +3173,10 @@+273270 271 272 -273 -274
# File 'cask/installer.rb', line 236 +# File 'cask/installer.rb', line 235 def install_artifacts(predecessor: nil) artifacts = @cask.artifacts @@ -3306,12 +3304,12 @@
+383 384 -385 -386+385
# File 'cask/installer.rb', line 384 +# File 'cask/installer.rb', line 383 def @metadata_subdir ||= @cask.("Casks", timestamp: :now, create: true) @@ -3350,6 +3348,7 @@+320 321 322 323 @@ -3358,11 +3357,10 @@
# File 'cask/installer.rb', line 321 +
# File 'cask/installer.rb', line 320 def missing_cask_and_formula_dependencies cask_and_formula_dependencies.reject do |cask_or_formula| @@ -3408,15 +3406,15 @@
+200 201 202 203 204 -205 -206+205
# File 'cask/installer.rb', line 201 +# File 'cask/installer.rb', line 200 def primary_container @primary_container ||= begin @@ -3458,6 +3456,7 @@
+530 531 532 533 @@ -3468,11 +3467,10 @@+541538 539 540 -541 -542
# File 'cask/installer.rb', line 531 +# File 'cask/installer.rb', line 530 def purge_backed_up_versioned_files # versioned staged distribution @@ -3520,13 +3518,13 @@
+569 570 571 -572 -573+572
# File 'cask/installer.rb', line 570 +# File 'cask/installer.rb', line 569 def purge_caskroom_path odebug "Purging all staged versions of Cask #{@cask}" @@ -3566,6 +3564,7 @@
+543 544 545 546 @@ -3589,11 +3588,10 @@+567564 565 566 -567 -568
# File 'cask/installer.rb', line 544 +# File 'cask/installer.rb', line 543 def purge_versioned_files ohai "Purging files for version #{@cask.version} of Cask #{@cask}" @@ -3813,13 +3811,13 @@
+418 419 420 -421 -422+421
# File 'cask/installer.rb', line 419 +# File 'cask/installer.rb', line 418 def remove_config_file FileUtils.rm_f @cask.config_path @@ -3859,13 +3857,13 @@
+423 424 425 -426 -427+426
# File 'cask/installer.rb', line 424 +# File 'cask/installer.rb', line 423 def remove_download_sha FileUtils.rm_f @cask.download_sha_path @@ -3958,6 +3956,7 @@
+439 440 441 442 @@ -3965,11 +3964,10 @@+447444 445 446 -447 -448
# File 'cask/installer.rb', line 440 +# File 'cask/installer.rb', line 439 def restore_backup return if !backup_path.directory? || !.directory? @@ -4029,14 +4027,14 @@
+450 451 452 453 -454 -455+454
# File 'cask/installer.rb', line 451 +# File 'cask/installer.rb', line 450 def revert_upgrade(predecessor:) opoo "Reverting upgrade for Cask #{@cask}" @@ -4077,6 +4075,7 @@+331 332 333 334 @@ -4122,11 +4121,10 @@
# File 'cask/installer.rb', line 332 +
# File 'cask/installer.rb', line 331 def satisfy_cask_and_formula_dependencies return if installed_as_dependency? @@ -4209,6 +4207,7 @@
+387 388 389 390 @@ -4216,11 +4215,10 @@+395392 393 394 -395 -396
# File 'cask/installer.rb', line 388 +# File 'cask/installer.rb', line 387 def save_caskfile old_savedir = @cask. @@ -4265,12 +4263,12 @@
+397 398 -399 -400+399
# File 'cask/installer.rb', line 398 +# File 'cask/installer.rb', line 397 def save_config_file @cask.config_path.atomic_write(@cask.config.to_json) @@ -4309,12 +4307,12 @@
+401 402 -403 -404+403
# File 'cask/installer.rb', line 402 +# File 'cask/installer.rb', line 401 def save_download_sha @cask.download_sha_path.atomic_write(@cask.new_download_sha) if @cask.checksumable? @@ -4481,13 +4479,13 @@
+429 430 431 -432 -433+432
# File 'cask/installer.rb', line 430 +# File 'cask/installer.rb', line 429 def start_upgrade(successor:) uninstall_artifacts(successor:) @@ -4540,15 +4538,15 @@
+171 172 173 174 175 -176 -177+176
# File 'cask/installer.rb', line 172 +# File 'cask/installer.rb', line 171 def summary s = +"" @@ -4607,6 +4605,7 @@
+406 407 408 409 @@ -4616,11 +4615,10 @@+416413 414 415 -416 -417
# File 'cask/installer.rb', line 407 +# File 'cask/installer.rb', line 406 def uninstall(successor: nil) load_installed_caskfile! @@ -4697,6 +4695,7 @@
+465 466 467 468 @@ -4727,11 +4726,10 @@+496493 494 495 -496 -497
# File 'cask/installer.rb', line 466 +# File 'cask/installer.rb', line 465 def uninstall_artifacts(clear: false, successor: nil) artifacts = @cask.artifacts @@ -4799,16 +4797,16 @@
+162 163 164 165 166 167 -168 -169+168
# File 'cask/installer.rb', line 163 +# File 'cask/installer.rb', line 162 def uninstall_existing_cask return unless @cask.installed? @@ -4970,6 +4968,7 @@
+190 191 192 193 @@ -4977,11 +4976,10 @@+198195 196 197 -198 -199
# File 'cask/installer.rb', line 191 +# File 'cask/installer.rb', line 190 def verify_has_sha odebug "Checking cask has checksum" @@ -5026,6 +5024,7 @@
+498 499 500 501 @@ -5039,11 +5038,10 @@+512509 510 511 -512 -513
# File 'cask/installer.rb', line 499 +# File 'cask/installer.rb', line 498 def zap load_installed_caskfile! diff --git a/docs/FormulaInstaller.html b/docs/FormulaInstaller.html index a23ac1f74..7de3f6090 100644 --- a/docs/FormulaInstaller.html +++ b/docs/FormulaInstaller.html @@ -2972,15 +2972,15 @@
+375 376 377 378 379 -380 -381+380
# File 'formula_installer.rb', line 376 +# File 'formula_installer.rb', line 375 def build_bottle_postinstall @etc_var_postinstall = Find.find(*@etc_var_dirs.select(&:directory?)).to_a @@ -3022,13 +3022,13 @@
+370 371 372 -373 -374+373
# File 'formula_installer.rb', line 371 +# File 'formula_installer.rb', line 370 def build_bottle_preinstall @etc_var_dirs ||= [HOMEBREW_PREFIX/"etc", HOMEBREW_PREFIX/"var"] @@ -3250,6 +3250,7 @@
+487 488 489 490 @@ -3280,7 +3281,7 @@515
# File 'formula_installer.rb', line 488 +# File 'formula_installer.rb', line 487 def check_conflicts return if force? @@ -3302,7 +3303,8 @@raise if Homebrew::EnvConfig.developer? - $stderr.puts "Please report this issue to the #{formula.tap} tap (not Homebrew/brew or Homebrew/homebrew-core)!" + $stderr.puts "Please report this issue to the #{formula.tap&.full_name} tap".squeeze(" ") + $stderr.puts " (not Homebrew/brew or Homebrew/homebrew-core)!" unless formula.core_formula? false else f.linked_keg.exist? && f.opt_prefix.exist? @@ -3357,6 +3359,7 @@
+247 248 249 250 @@ -3459,11 +3462,10 @@+350347 348 349 -350 -351
# File 'formula_installer.rb', line 248 +# File 'formula_installer.rb', line 247 def check_install_sanity check_installation_already_attempted @@ -3616,12 +3618,12 @@+245+243 244 -245 -246
# File 'formula_installer.rb', line 244 +# File 'formula_installer.rb', line 243 def check_installation_already_attempted raise FormulaInstallationAlreadyAttemptedError, formula if self.class.attempted.include?(formula) @@ -5894,6 +5896,7 @@
+383 384 385 386 @@ -5995,11 +5998,10 @@+485482 483 484 -485 -486
# File 'formula_installer.rb', line 384 +# File 'formula_installer.rb', line 383 def install lock @@ -6502,6 +6504,7 @@
+358 359 360 361 @@ -6511,11 +6514,10 @@+368365 366 367 -368 -369
# File 'formula_installer.rb', line 359 +# File 'formula_installer.rb', line 358 def install_fetch_deps return if @compute_dependencies.blank? @@ -7758,8 +7760,7 @@+226223 224 225 -226 -227
# File 'formula_installer.rb', line 202 @@ -7771,10 +7772,9 @@case deprecate_disable_type when :deprecated - puts "::warning::#{}" if ENV["GITHUB_ACTIONS"] opoo when :disabled - puts "::error::#{}" if ENV["GITHUB_ACTIONS"] + GitHub::Actions.puts_annotation_if_env_set(:error, ) raise CannotInstallFormulaError, end end @@ -8511,6 +8511,7 @@
+229 230 231 232 @@ -8522,11 +8523,10 @@+241238 239 240 -241 -242
# File 'formula_installer.rb', line 230 +# File 'formula_installer.rb', line 229 def verify_deps_exist begin diff --git a/docs/GitHub/Actions.html b/docs/GitHub/Actions.html index e3529f896..2a3ebf26e 100644 --- a/docs/GitHub/Actions.html +++ b/docs/GitHub/Actions.html @@ -124,6 +124,27 @@
+
- + + + .env_set? ⇒ Boolean + + + + + + + + + + private + + + +
+ + +- @@ -158,6 +179,27 @@
+ + + ++ private + + + +
- + + + .puts_annotation_if_env_set(type, message, file: nil, line: nil) ⇒ void + + + + + + + + + private @@ -175,7 +217,64 @@
Class Method Details
-+ ++
+ + .env_set? ⇒ Boolean + + + + + +
+++++ This method is part of a private API. + This method may only be used in the Homebrew/brew repository. + Third parties should avoid using this method if possible, as it may be removed or changed without warning. +
+ + ++
++ ++ ++ + +39 +40 +41++ +# File 'utils/github/actions.rb', line 39 + +def self.env_set? + ENV.fetch("GITHUB_ACTIONS", false).present? +end++.escape(string) ⇒ String @@ -359,6 +458,108 @@
+ This method is part of a private API. + This method may only be used in the Homebrew/brew repository. + Third parties should avoid using this method if possible, as it may be removed or changed without warning. +
+This method returns an undefined value.
+ +
+ + + +50 +51 +52 +53 +54 +55+ |
+
+ # File 'utils/github/actions.rb', line 50 + +def self.puts_annotation_if_env_set(type, , file: nil, line: nil) + # Don't print annotations during tests, too messy to handle these. + return if ENV.fetch("HOMEBREW_TESTS", false) + + puts Annotation.new(type, ) if env_set? +end+ |
+
-63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74+82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93
# File 'utils/github/actions.rb', line 63 +# File 'utils/github/actions.rb', line 82 -def initialize(type, , file:, title: nil, line: nil, end_line: nil, column: nil, end_column: nil) +def initialize(type, , file: nil, title: nil, line: nil, end_line: nil, column: nil, end_column: nil) raise ArgumentError, "Unsupported type: #{type.inspect}" if ANNOTATION_TYPES.exclude?(type) @type = type @message = Tty.strip_ansi() - @file = self.class.path_relative_to_workspace(file) + @file = self.class.path_relative_to_workspace(file) if file.present? @title = Tty.strip_ansi(title) if title @line = Integer(line) if line @end_line = Integer(end_line) if end_line @@ -481,16 +483,16 @@
-43 -44 -45 -46 -47 -48 -49+62 +63 +64 +65 +66 +67 +68
# File 'utils/github/actions.rb', line 43 +# File 'utils/github/actions.rb', line 62 def self.path_relative_to_workspace(path) workspace = Pathname(ENV.fetch("GITHUB_WORKSPACE", Dir.pwd)).realpath @@ -554,14 +556,18 @@
-99 -100 -101+120 +121 +122 +123 +124
# File 'utils/github/actions.rb', line 99 +# File 'utils/github/actions.rb', line 120 def relevant? + return true if @file.blank? + @file.descend.next.to_s != ".." end
-434 -435 -436 -437 -438 -439 440 441 442 @@ -975,10 +969,16 @@+455 +456 +457 +458 +459 +460 +461452 453 454 -455
# File 'extend/kernel.rb', line 434 +# File 'extend/kernel.rb', line 440 def disk_usage_readable(size_in_bytes) if size_in_bytes >= 1_073_741_824 @@ -1037,12 +1037,6 @@
-414 -415 -416 -417 -418 -419 420 421 422 @@ -1051,10 +1045,16 @@+428 +429 +430 +431 +432 +433 +434425 426 427 -428
# File 'extend/kernel.rb', line 414 +# File 'extend/kernel.rb', line 420 def ensure_executable!(name, formula_name = nil, reason: "") formula_name ||= name @@ -1107,12 +1107,6 @@
-375 -376 -377 -378 -379 -380 381 382 383 @@ -1143,10 +1137,16 @@+411 +412 +413 +414 +415 +416 +417408 409 410 -411
# File 'extend/kernel.rb', line 375 +# File 'extend/kernel.rb', line 381 def ensure_formula_installed!(formula_or_name, reason: "", latest: false, output_to_stderr: true, quiet: false) @@ -1219,20 +1219,20 @@
-326 -327 -328 -329 -330 -331 332 333 334 335 -336+336 +337 +338 +339 +340 +341 +342
# File 'extend/kernel.rb', line 326 +# File 'extend/kernel.rb', line 332 def exec_browser(*args) browser = Homebrew::EnvConfig.browser @@ -1279,13 +1279,13 @@
-321 -322 -323 -324+327 +328 +329 +330
# File 'extend/kernel.rb', line 321 +# File 'extend/kernel.rb', line 327 def exec_editor(*args) puts "Editing #{args.join "\n"}" @@ -1325,12 +1325,6 @@
-338 -339 -340 -341 -342 -343 344 345 346 @@ -1349,10 +1343,16 @@+362 +363 +364 +365 +366 +367 +368359 360 361 -362
# File 'extend/kernel.rb', line 338 +# File 'extend/kernel.rb', line 344 def ignore_interrupts(_opt = nil) # rubocop:disable Style/GlobalVars @@ -1413,12 +1413,6 @@
-224 -225 -226 -227 -228 -229 230 231 232 @@ -1430,10 +1424,16 @@+241 +242 +243 +244 +245 +246 +247238 239 240 -241
# File 'extend/kernel.rb', line 224 +# File 'extend/kernel.rb', line 230 def interactive_shell(formula = nil) unless formula.nil? @@ -1487,14 +1487,14 @@
-457 -458 -459 -460 -461+463 +464 +465 +466 +467
# File 'extend/kernel.rb', line 457 +# File 'extend/kernel.rb', line 463 def number_readable(number) numstr = number.to_i.to_s @@ -1598,8 +1598,6 @@
-97 -98 99 100 101 @@ -1670,10 +1668,16 @@+169 +170 +171 +172 +173 +174 +175166 167 168 -169
# File 'extend/kernel.rb', line 97 +# File 'extend/kernel.rb', line 99 def odeprecated(method, replacement = nil, disable: false, @@ -1727,11 +1731,14 @@@@ -1806,13 +1814,13 @@next unless (match = line.match(HOMEBREW_TAP_PATH_REGEX)) tap = Tap.fetch(match[:user], match[:repo]) - = +"\nPlease report this issue to the #{tap} tap (not Homebrew/brew or Homebrew/homebrew-core)" + = +"\nPlease report this issue to the #{tap.full_name} tap" + += " (not Homebrew/brew or Homebrew/homebrew-core)" unless tap.official? += ", or even better, submit a PR to fix it" if replacement << ":\n #{line.sub(/^(.*:\d+):.*$/, '\1')}\n\n" break end + file, line, = backtrace.first.split(":") + line = line.to_i if line.present? = +"Calling #{method} is #{verb}! #{}" << if @@ -1739,12 +1746,13 @@
disable = true if disable_for_developers && Homebrew::EnvConfig.developer? if disable || Homebrew.raise_deprecation_exceptions? - puts "::error::#{}" if ENV["GITHUB_ACTIONS"] + puts GitHub::Actions::Annotation.new(:error, , file:, line:) if GitHub::Actions.env_set? + GitHub::Actions.puts_annotation_if_env_set(:error, , file:, line:) exception = MethodDeprecatedError.new() exception.set_backtrace(backtrace) raise exception elsif !Homebrew.auditing? - puts "::warning::#{}" if ENV["GITHUB_ACTIONS"] + GitHub::Actions.puts_annotation_if_env_set(:warning, , file:, line:) opoo end end
-91 -92 93 -94+94 +95 +96
# File 'extend/kernel.rb', line 91 +# File 'extend/kernel.rb', line 93 def odie(error) onoe error @@ -1852,14 +1860,14 @@
-171 -172 -173 -174 -175+177 +178 +179 +180 +181
# File 'extend/kernel.rb', line 171 +# File 'extend/kernel.rb', line 177 def odisabled(method, replacement = nil, **) = { disable: true, caller: }.merge() @@ -1896,13 +1904,13 @@
-82 -83 84 -85+85 +86 +87
# File 'extend/kernel.rb', line 82 +# File 'extend/kernel.rb', line 84 def ofail(error) onoe error @@ -2144,18 +2152,20 @@
-73 74 75 76 -77+77 +78 +79
# File 'extend/kernel.rb', line 73 +# File 'extend/kernel.rb', line 74 def onoe() Tty.with($stderr) do |stderr| stderr.puts Formatter.error(, label: "Error") + GitHub::Actions.puts_annotation_if_env_set(:error, ) end end
# File 'extend/kernel.rb', line 64 @@ -2200,6 +2211,7 @@def opoo() Tty.with($stderr) do |stderr| stderr.puts Formatter.warning(, label: "Warning") + GitHub::Actions.puts_annotation_if_env_set(:warning, ) end end
-430 -431 -432+436 +437 +438
# File 'extend/kernel.rb', line 430 +# File 'extend/kernel.rb', line 436 def paths @paths ||= ORIGINAL_PATHS.uniq.map(&:to_s) @@ -2280,12 +2292,6 @@
-207 -208 -209 -210 -211 -212 213 214 215 @@ -2295,10 +2301,16 @@+222 +223 +224 +225 +226 +227 +228219 220 221 -222
# File 'extend/kernel.rb', line 207 +# File 'extend/kernel.rb', line 213 def pretty_duration(seconds) seconds = seconds.to_i @@ -2350,18 +2362,18 @@
-177 -178 -179 -180 -181 -182 183 184 -185+185 +186 +187 +188 +189 +190 +191
# File 'extend/kernel.rb', line 177 +# File 'extend/kernel.rb', line 183 def pretty_installed(formula) if !$stdout.tty? @@ -2406,18 +2418,18 @@
-187 -188 -189 -190 -191 -192 193 194 -195+195 +196 +197 +198 +199 +200 +201
# File 'extend/kernel.rb', line 187 +# File 'extend/kernel.rb', line 193 def pretty_outdated(formula) if !$stdout.tty? @@ -2462,18 +2474,18 @@
-197 -198 -199 -200 -201 -202 203 204 -205+205 +206 +207 +208 +209 +210 +211
# File 'extend/kernel.rb', line 197 +# File 'extend/kernel.rb', line 203 def pretty_uninstalled(formula) if !$stdout.tty? @@ -2519,17 +2531,17 @@
-261 -262 -263 -264 -265 -266 267 -268+268 +269 +270 +271 +272 +273 +274
# File 'extend/kernel.rb', line 261 +# File 'extend/kernel.rb', line 267 def quiet_system(cmd, *args) Homebrew._system(cmd, *args) do @@ -2573,14 +2585,14 @@
-538 -539 -540 -541 -542+544 +545 +546 +547 +548
# File 'extend/kernel.rb', line 538 +# File 'extend/kernel.rb', line 544 def redact_secrets(input, secrets) secrets.compact @@ -2621,17 +2633,17 @@
-364 -365 -366 -367 -368 -369 370 -371+371 +372 +373 +374 +375 +376 +377
# File 'extend/kernel.rb', line 364 +# File 'extend/kernel.rb', line 370 def redirect_stdout(file) out = $stdout.dup @@ -2758,14 +2770,14 @@
-252 -253 -254 -255 -256+258 +259 +260 +261 +262
# File 'extend/kernel.rb', line 252 +# File 'extend/kernel.rb', line 258 def safe_system(cmd, *args, **) return if Homebrew.system(cmd, *args, **) @@ -2806,20 +2818,20 @@
-526 -527 -528 -529 -530 -531 532 533 534 535 -536+536 +537 +538 +539 +540 +541 +542
# File 'extend/kernel.rb', line 526 +# File 'extend/kernel.rb', line 532 def tap_and_name_comparison proc do |a, b| @@ -2870,12 +2882,6 @@
-467 -468 -469 -470 -471 -472 473 474 475 @@ -2896,10 +2902,16 @@+493 +494 +495 +496 +497 +498 +499490 491 492 -493
# File 'extend/kernel.rb', line 467 +# File 'extend/kernel.rb', line 473 def truncate_text_to_approximate_size(str, max_bytes, = {}) front_weight = .fetch(:front_weight, 0.5) @@ -2958,22 +2970,22 @@
-273 -274 -275 -276 -277 -278 279 280 281 282 283 284 -285+285 +286 +287 +288 +289 +290 +291
# File 'extend/kernel.rb', line 273 +# File 'extend/kernel.rb', line 279 def which(cmd, path = ENV.fetch("PATH")) PATH.new(path).each do |p| @@ -3022,21 +3034,21 @@
-287 -288 -289 -290 -291 -292 293 294 295 296 297 -298+298 +299 +300 +301 +302 +303 +304
# File 'extend/kernel.rb', line 287 +# File 'extend/kernel.rb', line 293 def which_all(cmd, path = ENV.fetch("PATH")) PATH.new(path).filter_map do |p| @@ -3084,12 +3096,6 @@
-300 -301 -302 -303 -304 -305 306 307 308 @@ -3103,10 +3109,16 @@+319 +320 +321 +322 +323 +324 +325316 317 318 -319
# File 'extend/kernel.rb', line 300 +# File 'extend/kernel.rb', line 306 def which_editor(silent: false) editor = Homebrew::EnvConfig.editor @@ -3162,12 +3174,12 @@
-247 -248 -249+253 +254 +255
# File 'extend/kernel.rb', line 247 +# File 'extend/kernel.rb', line 253 def with_custom_locale(locale, &block) with_env(LC_ALL: locale, &block) @@ -3219,12 +3231,6 @@Example
-511 -512 -513 -514 -515 -516 517 518 519 @@ -3232,10 +3238,16 @@+524 +525 +526 +527 +528 +529 +530Example
521 522 523 -524
# File 'extend/kernel.rb', line 511 +# File 'extend/kernel.rb', line 517 def with_env(hash) old_values = {} @@ -3285,12 +3297,12 @@
-243 -244 -245+249 +250 +251
# File 'extend/kernel.rb', line 243 +# File 'extend/kernel.rb', line 249 def with_homebrew_path(&block) with_env(PATH: PATH.new(ORIGINAL_PATHS), &block) diff --git a/docs/method_list.html b/docs/method_list.html index 07d00e559..fda97e007 100644 --- a/docs/method_list.html +++ b/docs/method_list.html @@ -12445,6 +12445,14 @@Method List