lib/chef/knife/helpers/ec2_base.rb in knife-ec2-2.1.4 vs lib/chef/knife/helpers/ec2_base.rb in knife-ec2-2.1.6
- old
+ new
@@ -232,16 +232,14 @@
# the path to the aws credentials file.
# if passed via cli config use that
# if default location exists on disk fallback to that
# @return [String, nil] location to aws credentials file or nil if none exists
def aws_cred_file_location
- @cred_file ||= begin
- if !config[:aws_credential_file].nil?
- config[:aws_credential_file]
- else
- Chef::Util::PathHelper.home(".aws", "credentials") if ::File.exist?(Chef::Util::PathHelper.home(".aws", "credentials"))
- end
- end
+ @cred_file ||= if !config[:aws_credential_file].nil?
+ config[:aws_credential_file]
+ else
+ Chef::Util::PathHelper.home(".aws", "credentials") if ::File.exist?(Chef::Util::PathHelper.home(".aws", "credentials"))
+ end
end
# @return [String]
def iam_name_from_profile(profile)
# The IAM profile object only contains the name as part of the arn