You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unadorned methods like catch and throw can't currently be used in a Configuration block without causing load errors.
credentials do
provider :aws
catch(:done) do
[ENV['AWS_CREDENTIALS_PATH'], File.expand_path("~/.aws/config"), File.expand_path('~/.aws/credentials')].each do |file|
if File.exist?(file.to_s)
aws_profile_name ENV['AWS_PROFILE'] || 'tokyo'
aws_credentials_file file
throw(:done)
end
end
end
One fully-qualify the methods (e.g. ::Kernel.catch) to avoid errors, but this is a pretty baroque workaround, especially for non-skilled Ruby programmers who are used to DSLs like Chef recipes working without them.
The text was updated successfully, but these errors were encountered:
Hi! This is expected behavior of the DSL and I won't be changing this default behavior. One thing that I have on my todo list is adding an option when initializing an attribute struct object to optionally load root namespace constants (chrisroberts/attribute_struct#5). Batali is doing this within a customized struct it uses for parsing a Batali file and I'm looking to extract it to attribute_struct so it can be easily opted into else where. Once that's done, I'll add opt-in ability to the configuration struct.
Unadorned methods like
catch
andthrow
can't currently be used in aConfiguration
block without causing load errors.One fully-qualify the methods (e.g.
::Kernel.catch
) to avoid errors, but this is a pretty baroque workaround, especially for non-skilled Ruby programmers who are used to DSLs like Chef recipes working without them.The text was updated successfully, but these errors were encountered: