This repository has been archived by the owner on Mar 19, 2022. It is now read-only.
Explicitly set root path for default *_path
options
#308
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Chef 11.8.0 (with mixlib-config 2.0) sets
*_path
options by default based oncookbook_path
. If it is an array (as always in knife-solo), the other paths are also arrays. And after #300 we'll catch that and error out.Workaround is to explicitly specify all paths in .chef/knife.rb. Or add this:
While the conversion to Array is partly a regression in Chef itself (I'll file a ticket soon), we anyway want to set the default path relative to our kitchen root, as
cookbook_path
components might be pointing to somewhere else.This PR also adds verification that
node_path
is a String.node_path
made it back to Chef's default configuration in 11.8.0. And as pre 0.3.0 setups won't normally have it explicitly configured, it defaults to being an Array.Also a user might set it to be an Array, which leads knife-solo crashing with the infamous
ERROR: TypeError: no implicit conversion of Array into String
. This escaped from us in #300.