aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/exceptions.rb
AgeCommit message (Collapse)Author
2018-03-03Adjust docs and more internal code for Python 3.Mike McQuaid
Now we have `python` for Python 3 and `python@2` for Python 2 some more adjustments need to be made.
2018-01-28Don't suggest install from bottle if not availableAlyssa Ross
It only makes sense to tell a user to try installing from a bottle if there are bottles available for them to install for all the formulae they specified.
2017-10-18Use “squiggly” heredocs.Markus Reiter
2017-09-28BottleLoader: Use the formula stored in the bottleShaun Jackman
2017-09-24Rubocop: manual rule fixes.Mike McQuaid
2017-07-30Detect `Tap` in `CaskLoader`.Markus Reiter
2017-06-10Autocorrect Rubocop Style/PerlBackrefs.Mike McQuaid
2017-06-09BuildError: report options to analytics.Mike McQuaid
Without this it's not easy to make much sense of these failures.
2017-06-02Re-revert "Fix operator spacing."Markus Reiter
2017-06-01Revert "Fix operator spacing."ilovezfs
2017-05-31Fix operator spacing.Markus Reiter
2017-05-27Improve some `brew install` messaging.Mike McQuaid
Improve the messaging around `brew install` when there's a possible user action such as an `upgrade` or `link` and don't tell people to `install --force` when it's unnecessary. While I did this, tweak the output and function usage in a couple of related places. Some example output before this change: ``` Warning: openssl is a keg-only and another version is linked to opt. Use `brew install --force` if you want to install this version Warning: mysql@5.6 is a keg-only and another version is linked to opt. Use `brew install --force` if you want to install this version Warning: analog-6.0_1 already installed Warning: bash-completion@2-2.5 already installed, it's just not linked. ``` Some example output after this change: ``` Error: openssl 1.0.2k is already installed To upgrade to 1.0.2l, run `brew upgrade openssl` Warning: mysql@5.6 5.6.36_1 is already installed Warning: analog 6.0_1 is already installed Warning: bash-completion@2 2.5 is already installed, it's just not linked. You can use `brew link bash-completion@2` to link this version. ```
2017-04-18install: don't search when formula is unreadable.Mike McQuaid
These formulae are detected as missing but exist in an unreadable form. Fixes #2485
2017-03-26Update all references to taps.Mike McQuaid
- Remove taps that are (or will shortly be) deprecated. - Remove commands that are only relevant to the boneyard (which will shortly be removed).
2017-02-01formulary: handle ScriptError in formulaAlyssa Ross
I added a new `FormulaUnreadableError` subclass of `FormulaUnavailableError` so existing `rescue`s of `FormulaUnavailableError` handle this as well. The new subclass will output the name of the formula with the error (because this isn't always obvious from the original exception message) followed by the original error message. Fixes #1927.
2016-12-10Tell people to report URL/tap deprecations to the tap.Mike McQuaid
Rather than Homebrew/brew or Homebrew/homebrew-core.
2016-11-24exceptions: better handle unsupported macOS versions.Mike McQuaid
Don’t fail on `OS::ISSUES_URL` being missing (which happens on unsupported macOS versions) and instead tell people to not file issues.
2016-11-05exceptions: reorder output based on importance.Mike McQuaid
2016-11-05exceptions: use specific build error checks.Mike McQuaid
2016-10-08Rename FormulaMethodDeprecatedError to MethodDeprecatedError.Markus Reiter
2016-10-02virtualenv_install_with_resources: select correct pythonilovezfs
`virtualenv_install_with_resources` will now attempt to guess the desired Python based on the active build options and based on the dependencies and requirements. When the situation is ambiguous (e.g., `depends_on :python3` and `build.with? "python"` is true) raise `FormulaAmbiguousPythonError` unless `:using => "python"` or `:using => "python3"` has been passed to resolve the ambiguity. In most cases, this will allow ``` virtualenv_create(libexec, "python3") virtualenv_install_with_resources ``` to be changed to just ``` virtualenv_install_with_resources ```
2016-10-01Use Formatter for all URLs.Markus Reiter
2016-10-01Add `Formatter` module.Markus Reiter
2016-10-01Refactor Tty.Markus Reiter
2016-09-18Use new "macOS" naming where appropriate.Mike McQuaid
Not quite a mass replacement as I've used OS X and Mac OS X where describing specific older versions and added compatibility methods for things in the DSL.
2016-09-17rubocop --auto-correct all hash-rocket usage.Mike McQuaid
2016-09-17rubocop --auto-correct all remaining files.Mike McQuaid
But remove some manual `.freeze`s on constants that shouldn't be constants.
2016-08-17exceptions: assume Ruby 2.Mike McQuaid
2016-08-05various: eliminate the usage of `any?` (#638)Xu Cheng
`any?` is not the opposite of `empty?`. Besides the case that `[false, nil].any?` will return false, `any?`(O(n)) has much worse performance than `empty?`(O(1)).
2016-07-29exceptions: add FormulaMethodDeprecatedError.Mike McQuaid
This will be raised when Homebrew developers try to use formulae that call deprecated methods.
2016-07-27exceptions: port to generic layer.Mike McQuaid
2016-06-08exceptions: Remove duplicate "a" in "must be built from source" error (#339)Tony Kelman
otherwise would get "cannot be installed as a a binary package" since `package_text` contains "a binary package" in the singular case
2016-05-08Fix more bad dump_verbose_config referencesMartin Afanasjew
Follow-up to c7edf9a063dce63afb9ab54b6d71fe864d578365 and related to changes from #168.
2016-04-22Update CompilerSelectionErrorMisty De Meo
Fixes mistydemeo/tigerbrew#207. Fixes mistydemeo/tigerbrew#330.
2016-04-20exceptions: add reason to 'UsageError' exceptionMartin Afanasjew
Use the `reason` attribute to be able to handle `UsageError` subclasses more uniformly and simplify logic in `brew.rb` to handle them together.
2016-04-17exceptions: add FormulaClassUnavailableErrorMartin Afanasjew
2016-04-05tap: support --full even if installedilovezfs
Makes `tap` re-runnable and unshallows when requested with `--full`. Tapping with a different URL raises an exception. The homebrew/core tap cannot be untapped with `untap` so running `brew tap --full homebrew/core` is now a built-in way to get a full clone of this tap without resorting to workarounds. Closes #17. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-04-04GitHub: fix issues/pr searchingXu Cheng
Closes #6.
2016-04-03BuildError: update for core/formula separationXu Cheng
2016-02-01DSL method "apply" to specify patch filesilovezfs
The "apply" DSL method can be called from patch-do blocks to specify the paths within an archive of the desired patch files, which will be applied in the order in which they were supplied to the "apply" calls. If "apply" isn't used, raise an error whenever the extracted directory doesn't contain exactly one file. The "apply" method can be called zero or more times within a patch-do block with the following syntaxes supported: apply "single_apply" apply "multiple_apply_1", "multiple_apply_2" apply [array_of_apply] If apply must be used, a single call using the second syntax above is usually best practice. Each apply leaf should be the relative path to a specific patch file in the extracted directory. For example, if extracting this-v123-patches.tar.gz gives you this-123 this-123/.DS_Store this-123/LICENSE.txt this-123/patches this-123/patches/A.diff this-123/patches/B.diff this-123/patches/C.diff this-123/README.txt and you want to apply only B.diff and C.diff, then you need to use "patches/B.diff" and "patches/C.diff" for the lowest-level apply leaves. The code was provided by Xu Cheng. Any mistakes are mine.
2016-01-05exceptions: hotfixBaptiste Fontaine
2016-01-05doctor: move code away from cmd/Baptiste Fontaine
Closes Homebrew/homebrew#47665. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-12-30Tap#issues_url addedBaptiste Fontaine
Closes Homebrew/homebrew#47454. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-12-09exceptions: tap is a Tap object nowXu Cheng
2015-12-03centralize the logic of handling `homebrew-` in Tap.fetchXu Cheng
Closes Homebrew/homebrew#46537. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-11-17Common build environment methods moved in build_environment.rbBaptiste Fontaine
Closes Homebrew/homebrew#45966. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-11-09exceptions: add TapAlreadyTappedErrorXu Cheng
2015-10-23run Checks#check_for_unsupported_osx unconditionallyXu Cheng
2015-10-23os: centralize check for pre-release OS X versionsMartin Afanasjew
Provide `OS::Mac.prerelease?` for pre-release checks and use it where appropriate. This should simplify updating the test once a new OS X release lands. This also fixes a bug in `BuildError#dump`, where an empty warning message was printed on El Capitan after a failed from-source build, because the check there and the one in `check_for_unsupported_osx` were out of sync. Closes Homebrew/homebrew#45257. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-19install: make search output more intuitive.Eric Andrew Lewis
Closes Homebrew/homebrew#42222. Closes Homebrew/homebrew#44892. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>