Closed christinedraper closed 8 years ago
Great fix!! I'm pushing it through Delivery! 👍
I fixed some of the tests but overall I like this change!! It is under Review:
Change merged! Thank you @christinedraper https://github.com/chef-cookbooks/delivery-sugar/commit/3d13ff87762f0feb0fe7895f1433bffe298e3f42
Currently,
with_server_config
always uses/var/opt/delivery/workspace
when looking for the knife.rb file, and does not pick upnode['delivery']['workspace_path']
. This is becauseDeliverySugar::ChefServer
initialization is using the DSLdelivery_knife_rb
. Within the context of a recipe, this will correctly evaluate. However, in the context of the ChefServer class there is nonode
method and sochange
raises an exception anddelivery_workspace
returns the default value.The fix avoids this by passing in delivery_knife_rb evaluated in the context of the recipe.