You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove dead code from run_rake_task_directly method
Remove unreachable Rails environment loading code that was guarded by
'unless defined?(Rails)'. This guard is dead code because:
1. run_rake_task_directly is only called when rails_available? is true
2. rails_available? explicitly checks defined?(Rails) and returns false
if Rails is not defined
3. Therefore Rails is always defined when this method executes
The removed line attempted to load config/environment using Dir.pwd,
which was both unreachable and used the wrong path resolution method.
Since Rails is guaranteed to be available in this context, we can rely
on Rails.application.load_tasks directly.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments