Commit eb4b12b
Fix Gemspecs#in_this_bundle? crash when no Gemfile is discoverable
Bundler.definition raises Bundler::GemfileNotFound (not nil) when no
Gemfile is discoverable from the current process's working directory
- e.g. when Solargraph is installed and invoked as a standalone gem.
The safe-navigation chain in in_this_bundle? doesn't help since the
exception happens while evaluating Bundler.definition itself, which
crashed find_gem and, downstream, the CLI's unbundled-environment
paths exercised by this PR's shell.rb wiring.
Same fix as castwide#1225 (open upstream, not yet merged);
included directly here so this PR's own CI is green without waiting
on that PR to land first. Once castwide#1225 merges, a future rebase of this
branch will see it as a no-op.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent cf5c8c8 commit eb4b12b
2 files changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
223 | 229 | | |
224 | 230 | | |
225 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
100 | 119 | | |
0 commit comments