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

add --force to brew tap homebrew/core #16542

Closed
wants to merge 1 commit into from
Closed

Conversation

Qhilm
Copy link

@Qhilm Qhilm commented Jan 29, 2024

if --force is omitted, the following error is seen:

$ brew tap homebrew/core
Error: Tapping homebrew/core is no longer typically necessary.
Add --force if you are sure you need it done.
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

if `--force` is omitted, the following error is seen:

```
$ brew tap homebrew/core
Error: Tapping homebrew/core is no longer typically necessary.
Add --force if you are sure you need it done.
```
@cho-m
Copy link
Member

cho-m commented Jan 30, 2024

Did you follow the previous step?

first set HOMEBREW_NO_INSTALL_FROM_API=1 in your shell environment

The conditional for this message should check that first making --force unnecessary:

elsif (core_tap? || core_cask_tap?) && !Homebrew::EnvConfig.no_install_from_api? && !force
odie "Tapping #{name} is no longer typically necessary.\n" \
"Add #{Formatter.option("--force")} if you are sure you need it done."

@Qhilm
Copy link
Author

Qhilm commented Jan 30, 2024

Maybe I should have been clearer in my original comment:

I followed the guide properly and properly set HOMEBREW_NO_INSTALL_FROM_API=1. I nevertheless get the above mentioned error.

@cho-m
Copy link
Member

cho-m commented Jan 30, 2024

I followed the guide properly and properly set HOMEBREW_NO_INSTALL_FROM_API=1. I nevertheless get the above mentioned error.

I tried to reproduce locally but was unable to. Only can see warning when HOMEBREW_NO_INSTALL_FROM_API is unset.

Can't see any warning when export HOMEBREW_NO_INSTALL_FROM_API=1 before brew tap homebrew/core or HOMEBREW_NO_INSTALL_FROM_API=1 brew tap homebrew/core, e.g.

$ brew tap homebrew/core
Error: Tapping homebrew/core is no longer typically necessary.
Add --force if you are sure you need it done.

$ export HOMEBREW_NO_INSTALL_FROM_API=1; brew tap homebrew/core
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 1844121, done.
remote: Counting objects: 100% (540/540), done.
remote: Compressing objects: 100% (226/226), done.
^C

$ unset HOMEBREW_NO_INSTALL_FROM_API

$ brew tap homebrew/core
Error: Tapping homebrew/core is no longer typically necessary.
Add --force if you are sure you need it done.

$ HOMEBREW_NO_INSTALL_FROM_API=1 brew tap homebrew/core
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
...

@Qhilm
Copy link
Author

Qhilm commented Jan 30, 2024

Something is different on my machine it seems:

[20:50]:HOMEBREW_NO_INSTALL_FROM_API=1; brew tap homebrew/core
Error: Tapping homebrew/core is no longer typically necessary.
Add --force if you are sure you need it done.

Is there a debug mode I can turn on?

@cho-m
Copy link
Member

cho-m commented Jan 30, 2024

It looks like you are setting a local variable. A semi-colon (;) is the same as two separate commands just on one line.

As docs mention, you need to modify your shell environment instead, which means you should be using an environment variable.

@Qhilm
Copy link
Author

Qhilm commented Feb 3, 2024

sorry, my mistake indeed. I misunderstood what "shell environment" meant here.

@github-actions github-actions bot added the outdated PR was locked due to age label Mar 5, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants