diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-09-08 23:57:36 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-09-09 15:01:13 -0700 |
commit | bd6f49e04f56729853f54f2d2d94356edc2c6e8c (patch) | |
tree | b5dafed28e255c193c3b2996ccd7f52b88054801 /omnibus | |
parent | b6c2173bf578a8f1b44aeea2bc5eef9288e48964 (diff) | |
download | chef-bd6f49e04f56729853f54f2d2d94356edc2c6e8c.tar.gz |
Use __dir__ instead of getting the dir of __FILE__
This is a bit easier to read
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'omnibus')
-rw-r--r-- | omnibus/files/openssl-customization/windows/ssl_env_hack.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/omnibus/files/openssl-customization/windows/ssl_env_hack.rb b/omnibus/files/openssl-customization/windows/ssl_env_hack.rb index b86c17db82..27ba267e36 100644 --- a/omnibus/files/openssl-customization/windows/ssl_env_hack.rb +++ b/omnibus/files/openssl-customization/windows/ssl_env_hack.rb @@ -22,7 +22,7 @@ # This is required to make Chef tools use https URLs out of the box. unless ENV.key?("SSL_CERT_FILE") - base_dirs = File.dirname(__FILE__).split(File::SEPARATOR) + base_dirs = __dir__.split(File::SEPARATOR) (base_dirs.length - 1).downto(0) do |i| candidate_ca_bundle = File.join(base_dirs[0..i] + [ "ssl/certs/cacert.pem" ]) |