Skip to content

Commit

Permalink
ci,lib: fix typo; correct is brew list --versions
Browse files Browse the repository at this point in the history
The issue only shows up when using the `brew_install_if_not_exists`
function, because that one checks if the package is installed first, and
only then installs it.

`brew ls --version` also seems to be valid, but it looks like it prints
`brew Version` and exits successfully.

For this check, we only need `brew ls`, but using `brew list --versions`
also prints in the log the current installed versions, which is useful when
debugging.

Signed-off-by: Alexandru Ardelean <[email protected]>
  • Loading branch information
commodo committed Nov 14, 2019
1 parent 4540f7e commit a3a4c08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CI/travis/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ get_ldist() {
__brew_install_or_upgrade() {
brew install $1 || \
brew upgrade $1 || \
brew ls --version $1
brew ls --versions $1
}

brew_install_or_upgrade() {
Expand All @@ -161,7 +161,7 @@ brew_install_or_upgrade() {
}

__brew_install_if_not_exists() {
brew ls --version $1 || \
brew ls --versions $1 || \
brew install $1
}

Expand Down

0 comments on commit a3a4c08

Please sign in to comment.