diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 44895b3fe4..11452715aa 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -32,8 +32,10 @@ module Homebrew "If `super` is passed, use superenv even if the formula specifies the "\ "standard build environment." switch "--ignore-dependencies", - description: "Skip installing any dependencies of any kind. If they are not already "\ - "present, the formula will probably fail to install." + description: "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." switch "--only-dependencies", description: "Install the dependencies with specified options but do not install the "\ "specified formula." @@ -92,6 +94,15 @@ module Homebrew install_args.parse 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? ARGV.named.each do |name| next if File.exist?(name) diff --git a/docs/Manpage.md b/docs/Manpage.md index a47c0784ef..4cd5da9b75 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -229,7 +229,7 @@ installed formulae or, every 30 days, for all formulae. * `--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. * `--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`: Install the dependencies with specified options but do not install the specified formula. * `--cc`: diff --git a/manpages/brew-cask.1 b/manpages/brew-cask.1 index 30fde11c4f..d34358b377 100644 --- a/manpages/brew-cask.1 +++ b/manpages/brew-cask.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.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" \fBbrew\-cask\fR \- a friendly binary installer for macOS diff --git a/manpages/brew.1 b/manpages/brew.1 index 0816a4624f..b6d361d3fb 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.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" \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 \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 \fB\-\-only\-dependencies\fR