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

Limit calls to Dir.chdir in Rake::Application #365

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jonathanhefner
Copy link

@jonathanhefner jonathanhefner commented Oct 17, 2020

This reduces "conflicting chdir during another chdir block" warnings when calling Rake::Application#run inside a Dir.chdir block.

Comment on lines 277 to 278
Dir.chdir(dir) do
Dir.glob(@rakefiles.map { |name| escape_glob(name) }).first || @rakefiles.find(&:empty?)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When support for Ruby < 2.5 is dropped, this Dir.chdir can be replaced with Dir.glob's base kwarg.

This reduces "conflicting chdir during another chdir block" warnings
when calling `Rake::Application#run` inside a `Dir.chdir` block.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant