diff options
author | Kartik Null Cating-Subramanian <ksubramanian@chef.io> | 2015-03-17 18:47:08 -0400 |
---|---|---|
committer | Kartik Null Cating-Subramanian <ksubramanian@chef.io> | 2015-03-20 11:22:30 -0400 |
commit | 8adb5e38a31f47d84fcac6c825b5bd9279ba6aac (patch) | |
tree | 55052f72db7172064e5bb8b77869598a0ebc9b03 /lib/chef/knife/exec.rb | |
parent | 55d9ee24a8b2b14af415a36ff3c60b737dd84027 (diff) | |
download | chef-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.rb | 3 |
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 |