Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
boblail opened this issue Apr 4, 2022 · 3 comments

Comments

@boblail
Copy link

boblail commented Apr 4, 2022

  • your problem was from running the official install or uninstall script?
  • 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
@osalbahr
Copy link
Contributor

osalbahr commented Jul 2, 2023

I'm trying to replicate this issue. At which step does tapping homebrew/core happen?

@osalbahr
Copy link
Contributor

osalbahr commented Jul 2, 2023

Did the behavior change that this is no longer an issue? It seems that tapping only happens at brew install ... or similar commands, and it tries to re-tap if I interrupt it:

[dracula@fedora ~]$ brew install git
==> Tapping homebrew/core
Cloning into '/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 1535573, done.
remote: Counting objects: 100% (1807/1807), done.
remote: Compressing objects: 100% (745/745), done.
^Cfetch-pack: unexpected disconnect while reading sideband packet

[dracula@fedora ~]$ brew install git
==> Tapping homebrew/core
Cloning into '/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 1535573, done.
remote: Counting objects: 100% (1807/1807), done.
remote: Compressing objects: 100% (745/745), done.
^Cfetch-pack: unexpected disconnect while reading sideband packet

[dracula@fedora ~]$ 

@MikeMcQuaid
Copy link
Member

Note this is only with HOMEBREW_NO_INSTALL_FROM_API set which is non-default and not recommended for end-users.

@MikeMcQuaid MikeMcQuaid closed this as not planned Won't fix, can't repro, duplicate, stale Jul 3, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants