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

Fix installation issue when originally attempted at broken state #933

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cokyman
Copy link

@cokyman cokyman commented Jan 31, 2025

Fixes #766

Add a check for existing broken installation in install.sh.

  • Add a check for an existing broken installation at the start of the script
  • Add a function to remove the broken installation if detected
  • Call the function to remove the broken installation if detected

For more details, open the Copilot Workspace session.

Fixes Homebrew#766

Add a check for existing broken installation in `install.sh`.

* Add a check for an existing broken installation at the start of the script
* Add a function to remove the broken installation if detected
* Call the function to remove the broken installation if detected

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/Homebrew/install/issues/766?shareId=XXXX-XXXX-XXXX-XXXX).
@gromgit
Copy link
Member

gromgit commented Feb 1, 2025

A better test might be if git -C $HOMEBREW_PREFIX status -s exits non-zero. That directly addresses the failure condition you referenced, rather than giving a false positive on a healthy installation.

@MikeMcQuaid
Copy link
Member

A better test might be if git -C $HOMEBREW_PREFIX status -s exits non-zero. That directly addresses the failure condition you referenced, rather than giving a false positive on a healthy installation.

Agreed. This doesn't seem to detect whether an installation is actually broken but just that it already exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installation keeps on failing if originally attempted at broken state
3 participants