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

brew create fails to fetch description if name doesn't match URL #16675

Closed
3 tasks done
abitrolly opened this issue Feb 16, 2024 · 1 comment · Fixed by #16676
Closed
3 tasks done

brew create fails to fetch description if name doesn't match URL #16675

abitrolly opened this issue Feb 16, 2024 · 1 comment · Fixed by #16676
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age

Comments

@abitrolly
Copy link
Contributor

brew doctor output

Your system is ready to brew.                                                   /4,3s

Verification

  • My "brew doctor output" above says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update twice and am still able to reproduce my issue.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

brew config output

HOMEBREW_VERSION: 4.2.8-104-g57ff9bc
ORIGIN: https://github.com/Homebrew/brew
HEAD: 57ff9bc3eb1c1fcea1d95b755a5dde365255652f
Last commit: 2 hours ago
Core tap HEAD: f7d778e1bae8d8c42fdce3e3edb32c97d79f28ec
Core tap last commit: 2 hours ago
Core tap JSON: 16 Feb 05:47 UTC
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: :0
HOMEBREW_MAKE_JOBS: 4
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.1.4 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: quad-core 64-bit haswell
Clang: N/A
Git: 2.43.0 => /bin/git
Curl: 8.2.1 => /bin/curl
Kernel: Linux 6.7.4-200.fc39.x86_64 x86_64 GNU/Linux
OS: Fedora release 39 (Thirty Nine)
Host glibc: 2.38
/usr/bin/gcc: 13.2.1
/usr/bin/ruby: 3.2.2
glibc: N/A
gcc@11: N/A
gcc: N/A
xorg: N/A

What were you trying to do (and why)?

Create new formula.

What happened (include all command output)?

brew create fails to fetch formula description. Name is set manually and doesn't match URL.

The formula name of https://github.com/observablehq/framework would be manually set to "observable".

But here

metadata = GitHub.repository(@user, @name)
the new name is used to read repository data, and fails to read.

The solution is to init GitHub object from URL.

What did you expect to happen?

Fetch description successfully.

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

brew create https://github.com/observablehq/framework/archive/refs/tags/v1.0.0.tar.gz --node --set-name=observable
@abitrolly abitrolly added the bug Reproducible Homebrew/brew bug label Feb 16, 2024
@MikeMcQuaid
Copy link
Member

Thanks @abitrolly! FYI for future: don't need to create an issue if you're going to create a PR to fix it shortly after.

abitrolly added a commit to abitrolly/brew that referenced this issue Feb 16, 2024
abitrolly added a commit to abitrolly/brew that referenced this issue Feb 16, 2024
@github-actions github-actions bot added the outdated PR was locked due to age label Mar 18, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants