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 env_config generator. #14979

Merged
merged 1 commit into from Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Library/Homebrew/env_config.rb
Expand Up @@ -415,6 +415,7 @@ module EnvConfig
},
}.freeze

sig { params(env: Symbol, hash: T::Hash[Symbol, T.untyped]).returns(String) }
def env_method_name(env, hash)
method_name = env.to_s
.sub(/^HOMEBREW_/, "")
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/sorbet/custom_generators/env_config.rb
Expand Up @@ -13,7 +13,7 @@ module Homebrew::EnvConfig

dynamic_methods = {}
Homebrew::EnvConfig::ENVS.each do |env, hash|
next if Homebrew::EnvConfig::CUSTOM_IMPLEMENTATIONS.include?(env.to_s)
next if Homebrew::EnvConfig::CUSTOM_IMPLEMENTATIONS.include?(env)

name = Homebrew::EnvConfig.env_method_name(env, hash)
dynamic_methods[name] = { default: hash[:default] }
Expand Down