11047 Commits

Author SHA1 Message Date
Uladzislau Shablinski
0ae1785703 formula: use names for formula comparison
* Causes a bug in Formula#installed_alias_target_changed? when
  Formula#superseds_an_installed_formula? returns true because
  Formula#old_installed_formulae includes f for some Formula f.

* Causes a bug when foo@2.4 with alias foo has HEAD or devel version and
  we try to `brew upgrade foo --devel|--HEAD` from stable. The upgrade fails
  while since we installing formula to the same prefix it's alredy installed.
  The reason for that is that we use
  `formula_to_install = outdated.map(&:latest_formula)` in cmd/upgrade
  before calling upgrade_formula on foo.

  ```ruby
  def latest_formula
  installed_alias_target_changed? ? current_installed_alias_target : self
  end
  ```

  Formula#installed_alias_target_changed? compares formulae using
  Formula#==, which is wrong for this case, thus Formula#latest_formula doesn't
  return self and returns Formula#current_installed_alias_target with spec
  foo was initially installed instead of devel or HEAD, causing the error.
2016-10-20 03:09:23 +03:00
Markus Reiter
fb29a31c72 Merge pull request #1320 from reitermarkus/which-lsar
Also use `which` to find `lsar` in PATH.
2016-10-19 22:01:06 +02:00
Josh Hagins
de5cadc447 Merge pull request #1328 from jawshooah/cask/fix-tests
Unset HOMEBREW_DEVELOPER in cask tests likely to raise deprecation errors
2016-10-19 14:08:27 -04:00
Josh Hagins
c18441e81b Merge pull request #1315 from jawshooah/cask/load-only-rb
hbc/locations: arg is file only if absolute or .rb file
2016-10-19 12:36:42 -04:00
Josh Hagins
eebf535bee dsl_test: unset HOMEBREW_DEVELOPER to avoid deprecation errors 2016-10-19 12:35:47 -04:00
Josh Hagins
fef8f143e8 compliance_test: unset HOMEBREW_DEVELOPER to avoid deprecation errors 2016-10-19 12:35:47 -04:00
Josh Hagins
e8b6aa4ed1 cask/spec: replace with_env_var with with_environment 2016-10-19 12:35:47 -04:00
Josh Hagins
fba00f2bbf testing_env: extract with_environment to helper module 2016-10-19 12:35:46 -04:00
Markus Reiter
1e92f997c1 Also use which to find lsar in PATH. 2016-10-19 18:20:34 +02:00
Mike McQuaid
b9fe36abdc Merge pull request #1321 from wamatt/patch-1
brew.sh: tweak xcode hint to auto-accept license
2016-10-19 07:56:17 +01:00
Matt Tagg
db6681f2ef brew.sh: tweak xcode hint to auto-accept license
Small improvement to the xcode license hint. Reduces friction by allowing user to accept the license in a single step. 
Reference: http://apple.stackexchange.com/questions/175069/how-to-accept-xcode-license
2016-10-18 18:40:57 -07:00
Josh Hagins
d08f61a704 Merge pull request #1317 from reitermarkus/refactor-rubocop-cask
Refactor `brew cask style` not to require `.rubocop.yml`.
2016-10-18 19:22:12 -04:00
Josh Hagins
b4fc4acc09 hbc/locations: arg is file only if absolute or .rb file
Handle the case when an argument passed to `brew cask` is both the name
of a Cask and a non-Cask file in the current working directory.

Fixes https://github.com/caskroom/homebrew-cask/issues/25611.
2016-10-18 19:19:33 -04:00
Markus Reiter
63122c241c Merge pull request #1319 from reitermarkus/refactor-containers
Look for container extraction programs in PATH.
2016-10-19 00:11:50 +02:00
Markus Reiter
6e1c132f99 Remove Cask’s which method. 2016-10-18 17:22:08 +02:00
Markus Reiter
8d83516577 Look for container extraction programs in PATH. 2016-10-18 17:17:19 +02:00
Markus Reiter
9f76e2bbe3 Merge pull request #1318 from reitermarkus/refactor-cask-tests
Set `HOMEBREW_NO_EMOJI` and `HOMEBREW_CASK_OPTS` in `cask-tests`.
2016-10-18 17:01:55 +02:00
Josh Hagins
b6a0fdd357 Merge pull request #1312 from narendasan/cask_update_error_msgs
Cask update error msgs
2016-10-18 11:00:07 -04:00
Markus Reiter
143c3ac5c8 Force the use of rubocop-cask’s default configuration. 2016-10-18 16:40:25 +02:00
Markus Reiter
3a22aff1b6 Refactor brew cask style not to require .rubocop.yml. 2016-10-18 16:39:08 +02:00
Markus Reiter
a92dc724b0 Set HOMEBREW_NO_EMOJI and HOMEBREW_CASK_OPTS in cask-tests. 2016-10-18 16:24:30 +02:00
Naren
5f2929788c following to follow 2016-10-18 09:52:55 -04:00
Naren
6ac54f297f remove empty line and concatenate newline to e.message in cli.rb 2016-10-18 09:52:55 -04:00
Naren
29d81fc647 updating DSL test 2016-10-18 09:52:55 -04:00
Naren
8e9720c5b9 updated cmd to point to prebug steps url 2016-10-18 09:52:55 -04:00
Mike McQuaid
2da012d84d Merge pull request #1311 from MikeMcQuaid/audit-no-trailing-whitespace
audit: don't complain about trailing whitespace.
2016-10-18 08:38:39 +01:00
Mike McQuaid
56ae868cf1 audit: don't complain about trailing whitespace.
This is handled by `brew style` now.
2016-10-18 08:11:02 +01:00
Josh Hagins
1fd7d52505 Merge pull request #1291 from Homebrew/cask/bump-rubocop-cask
hbc/cli/style: bump RUBOCOP_CASK_VERSION
2016-10-17 23:56:02 -04:00
Josh Hagins
e9863a71f6 hbc/cli/style: bump RUBOCOP_CASK_VERSION 2016-10-17 16:43:24 -04:00
Mike McQuaid
0296439c83 Merge pull request #1306 from apjanke/tweak-brew-deps-zsh-completion
tweak 'brew deps' zsh completions
1.0.8
2016-10-17 08:36:35 +01:00
Mike McQuaid
e04bb5cdd7 Merge pull request #1307 from apjanke/format-identifiers-inside-other-formatting
Formatter: identifier: only reset color, not full styling
2016-10-17 08:35:20 +01:00
Andrew Janke
e72f1139ad Formatter: identifier: only reset color, not full styling 2016-10-17 00:45:37 -04:00
Andrew Janke
b7fc819150 tweak zsh 'brew deps' completions 2016-10-17 00:15:18 -04:00
Tim D. Smith
de880f1e87 Merge pull request #1298 from tdsmith/no-no-bad-unicode
Don't choke on invalid UTF-8 in `file` output
2016-10-16 09:47:02 -07:00
Mike McQuaid
87fad259a0 Merge pull request #1304 from MikeMcQuaid/old-osx-git-shim-more
scm/git: more old OS X versions tweaks.
2016-10-16 16:42:48 +01:00
Mike McQuaid
be2e6df948 scm/git: more old OS X versions tweaks.
- unset IFS to fix version parsing on older Bashes
- reuse existing HOMEBREW_MACOS_VERSION if it’s available
- set rather than unset popup_stub
2016-10-16 16:11:41 +01:00
Mike McQuaid
2a18378a03 Merge pull request #1303 from MikeMcQuaid/old-osx-git-shim
shims/scm/git: fix on old OS X versions.
2016-10-16 15:45:18 +01:00
ilovezfs
560bea6768 Merge pull request #1301 from ilovezfs/mountain-lion-depend-on-xz
dependency_collector: need xz dep on <= macOS 10.8
2016-10-16 06:59:14 -07:00
Mike McQuaid
7292ad1f1a shims/scm/git: fix on old OS X versions.
On older versions of OS X (i.e. pre-Mavericks) `xcode-select` is not
required to be set when using the CLT. Fix this behaviour so `brew
update` doesn't tell everyone on that configuration to `brew install
git`.
2016-10-16 14:14:23 +01:00
Uladzislau Shablinski
717eb97228 Merge pull request #1300 from delamoe/patch-3
Update FAQ.md
2016-10-16 15:50:32 +03:00
ilovezfs
a53eca8cde dependency_collector: need xz dep on <= macOS 10.8
Mountain Lion: http://opensource.apple.com/source/libarchive/libarchive-25.1/config.h
  `/* #undef HAVE_LIBLZMA */`

Mavericks: http://opensource.apple.com/source/libarchive/libarchive-29/config.h
  `#define HAVE_LIBLZMA 1`
2016-10-16 05:48:37 -07:00
delamoe
17f7a33dcb Update FAQ.md
### Is there a glossary of terms around?
All your terminology needs can be [found here](docs/Formula-Cookbook.md#homebrew-terminology). results in 404 error
2016-10-16 11:14:17 +03:00
Tim D. Smith
22a64aa6c6 Explain why info could be nil 2016-10-15 23:52:55 -07:00
Tim D. Smith
371cd0dd3e Don't choke on invalid UTF-8 in file output
Sometimes `file` output contains data from the file under examination,
which may include binary data that does not represent valid UTF-8
codepoints. String#split dies if it doesn't understand the encoding, so
tell Ruby to treat `file` output as a bytestring.
2016-10-15 21:21:08 -07:00
Mike McQuaid
7ac90613fd Merge pull request #1290 from maxnordlund/patch-1
Fix wrong ordering on when clauses in audit.rb
2016-10-15 17:52:54 +01:00
Markus Reiter
c233cacaf2 Merge pull request #1208 from reitermarkus/puts-columns
Refactor `puts_columns` to allow `$stderr.puts_columns`.
2016-10-15 18:51:11 +02:00
Max Nordlund
c7fde5ddc9 Fix when clause ordering. 2016-10-15 18:31:06 +02:00
Markus Reiter
581a1245bf Move Formatter.columns into utils/formatter. 2016-10-15 17:22:10 +02:00
Markus Reiter
ef70677e88 Add test for Formatter.columns. 2016-10-15 17:13:38 +02:00
Markus Reiter
198bf4d3bd Convert puts_columns to puts Formatter.columns. 2016-10-15 17:13:38 +02:00