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: uninitialized constant Tap::TAP_DIRECTORY #8

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

ParkMyCar
Copy link
Member

It looks like Tap::TAP_DIRECTORY was replaced in favor of HOMEBREW_TAP_DIRECTORY in Homebrew/brew#18010, now when trying to install a package from this tap I get the following error:

materializeinc/crosstools/x86_64-unknown-linux-gnu: uninitialized constant Tap::TAP_DIRECTORY
materializeinc/crosstools/aarch64-unknown-linux-gnu: uninitialized constant Tap::TAP_DIRECTORY

I don't know Ruby very well but I think this change should work

* if Tap::TAP_DIRECTORY is uninitialized use HOMEBREW_TAP_DIRECTORY
@ParkMyCar ParkMyCar requested a review from benesch August 27, 2024 15:18
lib/toolchain.rb Outdated
@@ -1,6 +1,7 @@
# frozen_string_literal: true

TAP_PATH = (Tap::TAP_DIRECTORY/"MaterializeInc"/"homebrew-crosstools").freeze
TAP_DIR = HOMEBREW_TAP_DIRECTORY || Tap::TAP_DIRECTORY
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the || will work as you expect. HOMEBREW_TAP_DIRECTORY will just explode if it's not defined, right? I'd just use only HOMEBREW_TAP_DIRECTORY and let's just tell everyone to upgrade.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea! Using just HOMEBREW_TAP_DIRECTORY and telling folks to upgrade works for me!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh yeah looks like you're right, it just explodes, Playground

@ParkMyCar ParkMyCar merged commit 64628dc into main Aug 27, 2024
0 of 2 checks passed
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.

2 participants