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 /chef-bin/bin | |
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 'chef-bin/bin')
-rwxr-xr-x | chef-bin/bin/chef-apply | 2 | ||||
-rwxr-xr-x | chef-bin/bin/chef-client | 2 | ||||
-rwxr-xr-x | chef-bin/bin/chef-resource-inspector | 2 | ||||
-rwxr-xr-x | chef-bin/bin/chef-service-manager | 2 | ||||
-rwxr-xr-x | chef-bin/bin/chef-shell | 2 | ||||
-rwxr-xr-x | chef-bin/bin/chef-solo | 2 | ||||
-rwxr-xr-x | chef-bin/bin/chef-windows-service | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/chef-bin/bin/chef-apply b/chef-bin/bin/chef-apply index 05b975a118..92c350b85b 100755 --- a/chef-bin/bin/chef-apply +++ b/chef-bin/bin/chef-apply @@ -18,7 +18,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -$:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) +$:.unshift(File.join(__dir__, "..", "lib")) require "chef/application/apply" Chef::Application::Apply.new.run(enforce_license: true) diff --git a/chef-bin/bin/chef-client b/chef-bin/bin/chef-client index 45a6af546a..69436d4182 100755 --- a/chef-bin/bin/chef-client +++ b/chef-bin/bin/chef-client @@ -18,7 +18,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -$:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) +$:.unshift(File.join(__dir__, "..", "lib")) require "chef" require "chef/application/client" diff --git a/chef-bin/bin/chef-resource-inspector b/chef-bin/bin/chef-resource-inspector index 6a7eac0c32..90bd94e05d 100755 --- a/chef-bin/bin/chef-resource-inspector +++ b/chef-bin/bin/chef-resource-inspector @@ -19,7 +19,7 @@ Encoding.default_external = Encoding::UTF_8 -$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))) +$:.unshift(File.expand_path(File.join(__dir__, "..", "lib"))) require "chef/resource_inspector" diff --git a/chef-bin/bin/chef-service-manager b/chef-bin/bin/chef-service-manager index 64cc043a54..2575e23dc0 100755 --- a/chef-bin/bin/chef-service-manager +++ b/chef-bin/bin/chef-service-manager @@ -18,7 +18,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -$:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) +$:.unshift(File.join(__dir__, "..", "lib")) require "chef" require "chef/application/windows_service_manager" require "chef/dist" diff --git a/chef-bin/bin/chef-shell b/chef-bin/bin/chef-shell index 666ce1944c..48263dd7ea 100755 --- a/chef-bin/bin/chef-shell +++ b/chef-bin/bin/chef-shell @@ -24,7 +24,7 @@ require "irb" require "irb/completion" require "irb/ext/save-history" -$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))) +$:.unshift(File.expand_path(File.join(__dir__, "..", "lib"))) require "chef/shell" diff --git a/chef-bin/bin/chef-solo b/chef-bin/bin/chef-solo index 7a2168230d..379aa89485 100755 --- a/chef-bin/bin/chef-solo +++ b/chef-bin/bin/chef-solo @@ -18,7 +18,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -$:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) +$:.unshift(File.join(__dir__, "..", "lib")) require "chef/application/solo" Chef::Application::Solo.new.run(enforce_license: true) diff --git a/chef-bin/bin/chef-windows-service b/chef-bin/bin/chef-windows-service index 646e3b4a93..ce1a30baae 100755 --- a/chef-bin/bin/chef-windows-service +++ b/chef-bin/bin/chef-windows-service @@ -23,7 +23,7 @@ # generate will call that file, and will be registered as # a windows service. -$:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) +$:.unshift(File.join(__dir__, "..", "lib")) require "chef" require "chef/application/windows_service" |