Commit 731b965
authored
[xaprepare] Fix for newer homebrew on macOS (#5302)
Context: Homebrew/brew#9033
Context: Homebrew/brew@5adb76a
Homebrew as of Homebrew/brew@5adb76a5 no longer supports the use of
`brew ls` with the `--versions` and `-1` parameters:
$ brew ls --versions -1 automake
Error: Invalid usage: Options --versions and -1 are mutually exclusive.
This change in Homebrew breaks `xaprepare`, as `xaprepare` would
use `brew ls --versions -1` to determine if a program was installed:
$ make prepare
…
Error: Invalid usage: Options --versions and -1 are mutually exclusive.
[MISSING]
Checking automake Usage: brew list, ls [options] [formula|cask]
The intention for our use of `xaprepare` was so that *if* a Homebrew
package had multiple versions installed, the use of
`brew ls --versions -1` would cause *only* the latest version to be
printed, not every version.
As `brew ls --versions -1` is no longer supported, update `xaprepare`
so that `brew ls --versions` output is parsed, preserving only the
first line of output. This avoids the invalid usage error, while
preserving our desired semantics incase multiple versions are present.1 parent 2dab2bc commit 731b965
File tree
1 file changed
+12
-2
lines changed- build-tools/xaprepare/xaprepare/Application
1 file changed
+12
-2
lines changedLines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
204 | 206 | | |
205 | 207 | | |
206 | 208 | | |
207 | | - | |
| 209 | + | |
208 | 210 | | |
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
212 | | - | |
| 214 | + | |
213 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
214 | 224 | | |
215 | 225 | | |
216 | 226 | | |
0 commit comments