Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #308 from tmatilai/chef_11.8_paths
Browse files Browse the repository at this point in the history
Explicitly set root path for default `*_path` options
  • Loading branch information
matschaffer committed Nov 9, 2013
2 parents 3af4bc9 + 9b76803 commit 55bf4f1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/knife-solo/node_config_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,17 @@ def self.included(other)
:long => '--environment ENVIRONMENT',
:description => 'The Chef environment for your node'

# Set default chef_repo_path for Chef >= 11.8.0
Chef::Config.chef_repo_path = '.'
end
end

def nodes_path
path = Chef::Config[:node_path]
if path && !path.is_a?(String)
ui.error %Q{node_path is not a String: #{path.inspect}, defaulting to "nodes"}
path = nil
end
path && File.exist?(path) ? path : 'nodes'
end

Expand Down

0 comments on commit 55bf4f1

Please sign in to comment.