brew install --ignore-dependencies: unsupported, developer flag.

People are using this instead of adjusting their PATH.
This commit is contained in:
Mike McQuaid 2019-04-02 08:18:30 +01:00
parent db02f93bb3
commit fdb18b8916
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
4 changed files with 17 additions and 6 deletions

View File

@ -32,8 +32,10 @@ module Homebrew
"If `super` is passed, use superenv even if the formula specifies the "\ "If `super` is passed, use superenv even if the formula specifies the "\
"standard build environment." "standard build environment."
switch "--ignore-dependencies", switch "--ignore-dependencies",
description: "Skip installing any dependencies of any kind. If they are not already "\ description: "An unsupported Homebrew development flag to skip installing any dependencies of "\
"present, the formula will probably fail to install." "any kind. If the dependencies are not already present, the formula will have issues. "\
"If you're not developing Homebrew, consider adjusting your PATH rather than "\
"using this flag."
switch "--only-dependencies", switch "--only-dependencies",
description: "Install the dependencies with specified options but do not install the "\ description: "Install the dependencies with specified options but do not install the "\
"specified formula." "specified formula."
@ -92,6 +94,15 @@ module Homebrew
install_args.parse install_args.parse
raise FormulaUnspecifiedError if args.remaining.empty? raise FormulaUnspecifiedError if args.remaining.empty?
if args.ignore_dependencies?
opoo <<~EOS
#{Tty.bold}--ignore-dependencies is an unsupported Homebrew developer flag!#{Tty.reset}
Adjust your PATH to put any preferred versions of applications earlier in the
PATH rather than using this unsupported flag!
EOS
end
unless args.force? unless args.force?
ARGV.named.each do |name| ARGV.named.each do |name|
next if File.exist?(name) next if File.exist?(name)

View File

@ -229,7 +229,7 @@ installed formulae or, every 30 days, for all formulae.
* `--env`: * `--env`:
If `std` is passed, use the standard build environment instead of superenv.If `super` is passed, use superenv even if the formula specifies the standard build environment. If `std` is passed, use the standard build environment instead of superenv.If `super` is passed, use superenv even if the formula specifies the standard build environment.
* `--ignore-dependencies`: * `--ignore-dependencies`:
Skip installing any dependencies of any kind. If they are not already present, the formula will probably fail to install. An unsupported Homebrew development flag to skip installing any dependencies of any kind. If the dependencies are not already present, the formula will have issues. If you're not developing Homebrew, consider adjusting your PATH rather than using this flag.
* `--only-dependencies`: * `--only-dependencies`:
Install the dependencies with specified options but do not install the specified formula. Install the dependencies with specified options but do not install the specified formula.
* `--cc`: * `--cc`:

View File

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

View File

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BREW" "1" "March 2019" "Homebrew" "brew" .TH "BREW" "1" "April 2019" "Homebrew" "brew"
. .
.SH "NAME" .SH "NAME"
\fBbrew\fR \- The missing package manager for macOS \fBbrew\fR \- The missing package manager for macOS
@ -279,7 +279,7 @@ If \fBstd\fR is passed, use the standard build environment instead of superenv\.
. .
.TP .TP
\fB\-\-ignore\-dependencies\fR \fB\-\-ignore\-dependencies\fR
Skip installing any dependencies of any kind\. If they are not already present, the formula will probably fail to install\. An unsupported Homebrew development flag to skip installing any dependencies of any kind\. If the dependencies are not already present, the formula will have issues\. If you\'re not developing Homebrew, consider adjusting your PATH rather than using this flag\.
. .
.TP .TP
\fB\-\-only\-dependencies\fR \fB\-\-only\-dependencies\fR