Add HOMEBREW_DISPLAY_INSTALL_TIMES

Fixes #6300
This commit is contained in:
Mike McQuaid 2019-07-28 11:12:32 +01:00
parent b6e7b66949
commit 9354081323
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
9 changed files with 17 additions and 4 deletions

View File

@ -78,6 +78,7 @@ module Homebrew
switch :verbose,
description: "Print the verification and postinstall steps."
switch "--display-times",
env: :display_install_times,
description: "Print install times for each formula at the end of the run."
switch "-i", "--interactive",
description: "Download and patch <formula>, then open a shell. This allows the user to "\

View File

@ -35,6 +35,7 @@ module Homebrew
switch :verbose,
description: "Print the verification and postinstall steps."
switch "--display-times",
env: :display_install_times,
description: "Print install times for each formula at the end of the run."
conflicts "--build-from-source", "--force-bottle"
formula_options

View File

@ -45,6 +45,7 @@ module Homebrew
switch :verbose,
description: "Print the verification and postinstall steps."
switch "--display-times",
env: :display_install_times,
description: "Print install times for each formula at the end of the run."
conflicts "--build-from-source", "--force-bottle"
formula_options

View File

@ -174,6 +174,9 @@ Note that environment variables must have a value set to be detected. For exampl
*Default:* the value of the user's `DISPLAY` environment variable.
* `HOMEBREW_DISPLAY_INSTALL_TIMES`:
If set, Homebrew will print install times for each formula at the end of the run.
* `HOMEBREW_EDITOR`:
If set, Homebrew will use this editor when editing a single formula, or
several formulae in the same directory.

View File

@ -22,7 +22,7 @@ class Messages
def display_messages
display_caveats
display_install_times if ARGV.include?("--display-times")
display_install_times if Homebrew.args.display_times?
end
def display_caveats

View File

@ -74,7 +74,7 @@ describe Messages do
context "when the --display-times argument is present" do
before do
allow(ARGV).to receive(:include?).with("--display-times").and_return(true)
allow(Homebrew.args).to receive(:display_times?).and_return(true)
end
context "when install_times is empty" do

View File

@ -1061,6 +1061,9 @@ Note that environment variables must have a value set to be detected. For exampl
*Default:* the value of the user's `DISPLAY` environment variable.
* `HOMEBREW_DISPLAY_INSTALL_TIMES`:
If set, Homebrew will print install times for each formula at the end of the run.
* `HOMEBREW_EDITOR`:
If set, Homebrew will use this editor when editing a single formula, or
several formulae in the same directory.

View File

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BREW\-CASK" "1" "May 2019" "Homebrew" "brew-cask"
.TH "BREW\-CASK" "1" "July 2019" "Homebrew" "brew-cask"
.
.SH "NAME"
\fBbrew\-cask\fR \- a friendly binary installer for macOS

View File

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BREW" "1" "May 2019" "Homebrew" "brew"
.TH "BREW" "1" "July 2019" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The missing package manager for macOS
@ -1297,6 +1297,10 @@ If set, Homebrew will use this X11 display when opening a page in a browser, for
\fIDefault:\fR the value of the user\'s \fBDISPLAY\fR environment variable\.
.
.TP
\fBHOMEBREW_DISPLAY_INSTALL_TIMES\fR
If set, Homebrew will print install times for each formula at the end of the run\.
.
.TP
\fBHOMEBREW_EDITOR\fR
If set, Homebrew will use this editor when editing a single formula, or several formulae in the same directory\.
.