itamae-kitchen / itamae

Configuration management tool inspired by Chef, but simpler and lightweight. Formerly known as Lightchef.
https://itamae.kitchen/
MIT License
1.12k stars 125 forks source link

Execute local_ruby_block code inside of chdir-ed block if cwd presented #355

Closed unasuke closed 2 years ago

unasuke commented 2 years ago

"local_ruby_block" execute by itamae's ruby process. The process doesn't change its working directory, which is presented by "cwd" attribute. I think it's the root cause of issue #353.

I made the local_ruby_block code execute inside of Dir.chdir block if cwd attribute was presented to fix it. This behavior has existed since 2015. (#146) There might be a recipe that is dependent on current behavior somewhere. Although I couldn't find public itamae recipes that use "local_ruby_block" with "cwd", the change has a small impact, I think.

Fix #353

unasuke commented 2 years ago

Thanks. I will release this as v1.14.0 in a few days.

unasuke commented 2 years ago

I will release itamae v1.14.0 (bump minor version) about 7/6 20:00 JST.