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_overrides.rb | |
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_overrides.rb')
-rw-r--r-- | omnibus_overrides.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/omnibus_overrides.rb b/omnibus_overrides.rb index 49009c8778..572f2a84e9 100644 --- a/omnibus_overrides.rb +++ b/omnibus_overrides.rb @@ -29,5 +29,5 @@ override "zlib", version: "1.2.11" # is in master, which won't match what's in the Gemfile.lock and used by the chef # definition. This pin will ensure that ohai and chef-client commands use the # same (released) version of ohai. -gemfile_lock = File.join(File.expand_path(File.dirname(__FILE__)), "Gemfile.lock") +gemfile_lock = File.join(File.expand_path(__dir__), "Gemfile.lock") override "ohai", version: "#{::File.readlines(gemfile_lock).find { |l| l =~ /^\s+ohai \((\d+\.\d+\.\d+)\)/ }; "v" + $1}" # rubocop: disable Layout/SpaceInsideStringInterpolation |