Closed rastasheep closed 9 years ago
@rastasheep there is a bit more to it than just changing the string assigned to the attribute. You need to also assign a value to the variable to be replaced. Unless I'm missing something here I don't think this will work.
I'm not sure about assigning to variable, because node.default
is some kind variable too, and also in linked example it's not used on that way. In other hand it seems that there's need to use %{}
syntax on every place where you use base attribute.
Do you maybe have some suggestion how we can test this?
It would be great to fix this because i have spent a few hours on debugging what causes wrong installation path.
This is indeed not remotely functional.
Use lazy evaluation for the derived attributes to delay the string interpolation until later. With this user can override only one attribute without need for overriding all other attributes that use main one.
For example (before PR):
by overriding
install_prefix
you would not overridedefault[:rbenv][:root_path]
because it's interpolated before attribute from wrapper cookbook existed.More info about this problem you can find here (tnx to @coderanger).