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(tap): handle unset git config vars in taps #16825

Closed
wants to merge 1 commit into from

Conversation

gibfahn
Copy link
Contributor

@gibfahn gibfahn commented Mar 5, 2024

  • 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?

cc/ @reitermarkus

Commits (oldest to newest)

3479d70 fix(tap): handle unset git config vars in taps

I'm not sure how/when this happened, but I have this in the
.git/config for some of my taps.

[homebrew]
	private =

And this breaks brew upgrade and brew tap-info <tap> since
#16811.


I'm not sure how/when this happened, but I have this in the
`.git/config` for some of my taps.

```
[homebrew]
	private =
```

And this breaks `brew upgrade` and `brew tap-info <tap>` since
<Homebrew#16811>.
@MikeMcQuaid
Copy link
Member

I cannot reproduce by adding

[homebrew]
	private = 

to a tap and running brew tap-info on that tap.

@gibfahn can you try to get a more minimal, step-by-step reproduction? Would rather not merge this as-is.

@reitermarkus
Copy link
Member

The only place where a nil could come from seems to be GitHub.private_repo?. Can you check

brew ruby -e 'p GitHub.private_repo?("<your/homebrew-tap>")'

@reitermarkus
Copy link
Member

Do you have HOMEBREW_NO_GITHUB_API set?

$ brew ruby -e 'p GitHub.private_repo?("reitermarkus/homebrew-tap")'
false

vs.

$ export HOMEBREW_NO_GITHUB_API=1
$ brew ruby -e 'p GitHub.private_repo?("reitermarkus/homebrew-tap")'
nil

@gibfahn
Copy link
Contributor Author

gibfahn commented Mar 6, 2024

Do you have HOMEBREW_NO_GITHUB_API set?

Oh yes, I guess that's the difference? Was trying to work out why I could reproduce it.

@gibfahn gibfahn deleted the fix_tap_check branch March 6, 2024 22:21
@github-actions github-actions bot added the outdated PR was locked due to age label Apr 6, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 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