summaryrefslogtreecommitdiff
path: root/lib/chef/knife/exec.rb
diff options
context:
space:
mode:
authorKartik Null Cating-Subramanian <ksubramanian@chef.io>2015-03-17 18:47:08 -0400
committerKartik Null Cating-Subramanian <ksubramanian@chef.io>2015-03-20 11:22:30 -0400
commit8adb5e38a31f47d84fcac6c825b5bd9279ba6aac (patch)
tree55052f72db7172064e5bb8b77869598a0ebc9b03 /lib/chef/knife/exec.rb
parent55d9ee24a8b2b14af415a36ff3c60b737dd84027 (diff)
downloadchef-8adb5e38a31f47d84fcac6c825b5bd9279ba6aac.tar.gz
Modify accesses to HOME to use path_helper instead.
Diffstat (limited to 'lib/chef/knife/exec.rb')
-rw-r--r--lib/chef/knife/exec.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/knife/exec.rb b/lib/chef/knife/exec.rb
index 3e8196c616..ace4ee2300 100644
--- a/lib/chef/knife/exec.rb
+++ b/lib/chef/knife/exec.rb
@@ -17,6 +17,7 @@
#
require 'chef/knife'
+require 'chef/util/path_helper'
class Chef::Knife::Exec < Chef::Knife
@@ -42,7 +43,7 @@ class Chef::Knife::Exec < Chef::Knife
# Default script paths are chef-repo/.chef/scripts and ~/.chef/scripts
config[:script_path] << File.join(Chef::Knife.chef_config_dir, 'scripts') if Chef::Knife.chef_config_dir
- config[:script_path] << File.join(ENV['HOME'], '.chef', 'scripts') if ENV['HOME']
+ Chef::Util::PathHelper.home('.chef', 'scripts') { |p| config[:script_path] << p }
scripts = Array(name_args)
context = Object.new