summaryrefslogtreecommitdiff
path: root/chef-bin/bin
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-09-08 23:57:36 -0700
committerTim Smith <tsmith84@gmail.com>2020-09-09 15:01:13 -0700
commitbd6f49e04f56729853f54f2d2d94356edc2c6e8c (patch)
treeb5dafed28e255c193c3b2996ccd7f52b88054801 /chef-bin/bin
parentb6c2173bf578a8f1b44aeea2bc5eef9288e48964 (diff)
downloadchef-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-xchef-bin/bin/chef-apply2
-rwxr-xr-xchef-bin/bin/chef-client2
-rwxr-xr-xchef-bin/bin/chef-resource-inspector2
-rwxr-xr-xchef-bin/bin/chef-service-manager2
-rwxr-xr-xchef-bin/bin/chef-shell2
-rwxr-xr-xchef-bin/bin/chef-solo2
-rwxr-xr-xchef-bin/bin/chef-windows-service2
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"