Commit 5bba99d
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 <[email protected]>1 parent a403aa2 commit 5bba99d
1 file changed
+0
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 48 | | |
52 | 49 | | |
53 | 50 | | |
| |||
0 commit comments