install icon indicating copy to clipboard operation
install copied to clipboard

If cloning the homebrew/core taps fails (like for a flaky network connection), `install.sh` will appear to succeed but `brew install` will fail

Open boblail opened this issue 2 years ago • 0 comments

  • [x] your problem was from running the official install or uninstall script?
  • [x] after installation: ran brew config and brew doctor and included their output with your issue? If you couldn't install: provided your OS version with the output of your issue?

What you were trying to do (and why)

Install Homebrew using the official script.

What happened (include command output)

  1. I interrupted the script while cloning the homebrew-core tap (or my Internet connection was interrupted).
  2. I reran the script and it succeeded.
  3. I tried to install a formula in the core tap and it failed.
brew install homebrew/core/git
  ~ brew install homebrew/core/git
Warning: No available formula or cask with the name "homebrew/core/git".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
  

What you expected to happen

I would've expected the second attempt to run install.sh to correct the problem or to abort with an error like the one that brew doctor displays:

Warning: Homebrew/homebrew-core was not tapped properly! Run:
  rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-core"
  brew tap homebrew/core

Step-by-step reproduction instructions (by running brew commands)

  1. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. Press Ctrl C while it is tapping homebrew/core
  3. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  4. brew install homebrew/core/git

boblail avatar Apr 04 '22 19:04 boblail