Closed bai closed 6 years ago
As we’re assigning it to a new variable, this shouldn’t cause any issues? Are you seeing a warning or error in your Chef runs?
Yep, when you assign it to a new variable it makes a pointer instead of duping the value, this PR makes an actual dup.
@bai aha! The subtleties of Ruby. Sometimes pointers, sometimes copies. Sounds good.
In Chef Client 13 some types of resource properties became immutable, including Hash. So, in order to change the "environment" hash, we need to create a mutable copy first.
cc: @evertrue @jeffbyrnes