Commit b359ea3
[ruby/rubygems] Skip checksum for the bundler gem if no
- ### Problem
This change is purely to fix a problem when developing Bundler.
When we tried to release Bundler 4.0.9, we bumped the VERSION
from `4.1.0.dev` to `4.0.9`, this condition now evaluates to false
https://github.com/ruby/rubygems/blob/34d19fa8a3f84c50e2ba65e0f39c80045e7cbfb8/bundler/lib/bundler/lockfile_generator.rb#L106.
We then ended up with a CI crash.
```
Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/runner/work/rubygems/rubygems/cache/bundler-4.0.9.gem
```
### Context
Computing a checksum for the `bundler` gem is only possible
when the `bundler.gem` binary exists on disk. When a regular
user interacts with `bundler`, the spec is loaded from disk and
an associated cached `bundler.gem` should exists.
However, when developing Bundler, the spec doesn't come from disk
but from a fake spec https://github.com/ruby/rubygems/blob/34d19fa8a3f84c50e2ba65e0f39c80045e7cbfb8/bundler/lib/bundler/source/metadata.rb#L22-L28
that with no associated `bundler.gem`.
### Solution
To prevent CI from breaking whenever we make a release, we have
to skip computing a checksum if no `bundler.gem` exists.
ruby/rubygems@01e0e61612bundler.gem exists on disk:1 parent a08f547 commit b359ea3
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
108 | 111 | | |
109 | 112 | | |
110 | | - | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| |||
0 commit comments