Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Jul 5, 2022

Conversation

unasuke
Copy link
Member

@unasuke unasuke commented Jul 3, 2022

"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 itamae's issue itamae-kitchen/itamae#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 (in itamae itamae-kitchen/itamae#146, not mitamae).

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.

ref itamae-kitchen/itamae#355

@k0kubun how do you think?

"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 itamae's issue 353.
itamae-kitchen/itamae#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 (in itamae pr 146, not mitamae).
itamae-kitchen/itamae#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.

ref itamae-kitchen/itamae#355
@k0kubun
Copy link
Member

k0kubun commented Jul 4, 2022

@k0kubun how do you think?

I agree with the idea. The suggested change would be less surprising as long as we keep it a global attribute.

I see that itamae-kitchen/itamae#355 is still not merged. Could you let me know when you decide to merge itamae-kitchen/itamae#355 so that I can keep the latest mitamae consistent with the latest Itamae?

@unasuke
Copy link
Member Author

unasuke commented Jul 5, 2022

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

@k0kubun
Copy link
Member

k0kubun commented Jul 5, 2022

As it's already decided to be released, I'm okay with just releasing it on the mitamae side now. Merging.

@k0kubun k0kubun merged commit d375bfc into master Jul 5, 2022
@k0kubun k0kubun deleted the chdir_local_ruby_block branch July 5, 2022 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants