Merge pull request #9477 from MikeMcQuaid/cleanup_periodic_full_days
Add HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS environment variable
This commit is contained in:
commit
4f438f6e45
@ -2,6 +2,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "utils/bottles"
|
||||
|
||||
require "utils/gems"
|
||||
require "formula"
|
||||
require "cask/cask_loader"
|
||||
@ -12,7 +13,7 @@ module Homebrew
|
||||
#
|
||||
# @api private
|
||||
class Cleanup
|
||||
CLEANUP_DEFAULT_DAYS = 30
|
||||
CLEANUP_DEFAULT_DAYS = Homebrew::EnvConfig.cleanup_periodic_full_days.to_i.freeze
|
||||
private_constant :CLEANUP_DEFAULT_DAYS
|
||||
|
||||
# {Pathname} refinement with helper functions for cleaning up files.
|
||||
|
||||
@ -68,6 +68,11 @@ module Homebrew
|
||||
"`~/.profile`, `~/.bash_profile`, or `~/.zshenv`:\n\n" \
|
||||
' `export HOMEBREW_CASK_OPTS="--appdir=~/Applications --fontdir=/Library/Fonts"`',
|
||||
},
|
||||
HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: {
|
||||
description: "If set, `brew install`, `brew upgrade` and `brew reinstall` will cleanup all formulae " \
|
||||
"when this number of days has passed.",
|
||||
default: 30,
|
||||
},
|
||||
HOMEBREW_CLEANUP_MAX_AGE_DAYS: {
|
||||
description: "Cleanup all cached files older than this many days.",
|
||||
default: 120,
|
||||
@ -243,7 +248,8 @@ module Homebrew
|
||||
},
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: {
|
||||
description: "If set, `brew install`, `brew upgrade` and `brew reinstall` will never automatically " \
|
||||
"cleanup installed/upgraded/reinstalled formulae or all formulae every 30 days.",
|
||||
"cleanup installed/upgraded/reinstalled formulae or all formulae every " \
|
||||
"HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS days.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_PRY: {
|
||||
|
||||
@ -1687,6 +1687,11 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
|
||||
|
||||
`export HOMEBREW_CASK_OPTS="--appdir=~/Applications --fontdir=/Library/Fonts"`
|
||||
|
||||
- `HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS`
|
||||
<br>If set, `brew install`, `brew upgrade` and `brew reinstall` will cleanup all formulae when this number of days has passed.
|
||||
|
||||
*Default:* `30`.
|
||||
|
||||
- `HOMEBREW_CLEANUP_MAX_AGE_DAYS`
|
||||
<br>Cleanup all cached files older than this many days.
|
||||
|
||||
@ -1823,7 +1828,7 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
|
||||
*Note:* While ensuring your downloads are fully secure, this is likely to cause from-source SourceForge, some GNU & GNOME-hosted formulae to fail to download.
|
||||
|
||||
- `HOMEBREW_NO_INSTALL_CLEANUP`
|
||||
<br>If set, `brew install`, `brew upgrade` and `brew reinstall` will never automatically cleanup installed/upgraded/reinstalled formulae or all formulae every 30 days.
|
||||
<br>If set, `brew install`, `brew upgrade` and `brew reinstall` will never automatically cleanup installed/upgraded/reinstalled formulae or all formulae every HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS days.
|
||||
|
||||
- `HOMEBREW_PRY`
|
||||
<br>If set, use Pry for the `brew irb` command.
|
||||
|
||||
@ -2364,6 +2364,15 @@ Append these options to all \fBcask\fR commands\. All \fB\-\-*dir\fR options, \f
|
||||
\fBexport HOMEBREW_CASK_OPTS="\-\-appdir=~/Applications \-\-fontdir=/Library/Fonts"\fR
|
||||
.
|
||||
.TP
|
||||
\fBHOMEBREW_CLEANUP_PERIODIC_FULL_DAYS\fR
|
||||
.
|
||||
.br
|
||||
If set, \fBbrew install\fR, \fBbrew upgrade\fR and \fBbrew reinstall\fR will cleanup all formulae when this number of days has passed\.
|
||||
.
|
||||
.IP
|
||||
\fIDefault:\fR \fB30\fR\.
|
||||
.
|
||||
.TP
|
||||
\fBHOMEBREW_CLEANUP_MAX_AGE_DAYS\fR
|
||||
.
|
||||
.br
|
||||
@ -2622,7 +2631,7 @@ If set, forbid redirects from secure HTTPS to insecure HTTP\.
|
||||
\fBHOMEBREW_NO_INSTALL_CLEANUP\fR
|
||||
.
|
||||
.br
|
||||
If set, \fBbrew install\fR, \fBbrew upgrade\fR and \fBbrew reinstall\fR will never automatically cleanup installed/upgraded/reinstalled formulae or all formulae every 30 days\.
|
||||
If set, \fBbrew install\fR, \fBbrew upgrade\fR and \fBbrew reinstall\fR will never automatically cleanup installed/upgraded/reinstalled formulae or all formulae every HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS days\.
|
||||
.
|
||||
.TP
|
||||
\fBHOMEBREW_PRY\fR
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user