diff options
author | John Keiser <jkeiser@opscode.com> | 2013-08-28 12:01:05 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2013-08-28 12:01:05 -0700 |
commit | 46c2dafdd89c9082532a220486f401939925a6fd (patch) | |
tree | de29d0d5ba33dbd9e55d72577bcd6d9b7016cd29 /lib/chef/chef_fs/knife.rb | |
parent | b3f04c87745babcad89fe803ed684e66b4fdc223 (diff) | |
download | chef-46c2dafdd89c9082532a220486f401939925a6fd.tar.gz |
Make chef_repo_path globally accessible across knife and chef-client
Diffstat (limited to 'lib/chef/chef_fs/knife.rb')
-rw-r--r-- | lib/chef/chef_fs/knife.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/chef/chef_fs/knife.rb b/lib/chef/chef_fs/knife.rb index 5900c29f61..68bfb70e34 100644 --- a/lib/chef/chef_fs/knife.rb +++ b/lib/chef/chef_fs/knife.rb @@ -60,7 +60,7 @@ class Chef # --chef-repo-path overrides all other paths if config[:chef_repo_path] Chef::Config[:chef_repo_path] = config[:chef_repo_path] - Chef::ChefFS::Config::PATH_VARIABLES.each do |variable_name| + Chef::Config::PATH_VARIABLES.each do |variable_name| Chef::Config[variable_name.to_sym] = chef_repo_paths.map { |path| File.join(path, "#{variable_name[0..-6]}s") } end end @@ -96,7 +96,6 @@ class Chef args.map do |arg| if !@chef_fs_config.base_path && !Chef::ChefFS::PathUtils.is_absolute?(arg) # Check if chef repo path is specified to give a better error message - @chef_fs_config.require_chef_repo_path ui.error("Attempt to use relative path '#{arg}' when current directory is outside the repository path") exit(1) end |