diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-01 23:52:17 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-01 23:52:17 +0200 |
| commit | 3f833b7f82bde48ceb20f4b90407afc928ebe7b3 (patch) | |
| tree | 3d169a582572aab80503573b0f03634be8939612 /Gemfile | |
| parent | 9a6526a7022c1d1172c1be9b9b3545ed6e00c9e6 (diff) | |
bugfix/refactor: add error handling to DNFPackageManager shell commands
system() returns false/nil on failure but the original code ignored the
return value, silently swallowing dnf errors.
Add a private run_dnf! helper that checks the return value and raises
DNFPackageManager::CommandFailed with the dnf exit code on failure.
Replace the one-liner methods with full method bodies that delegate to
run_dnf!.
Also fix two latent constant-resolution bugs:
- Use $? instead of $CHILD_STATUS (the latter requires `require 'English'`
and is always nil without it)
- Use ::File instead of File in Package#initialize to avoid resolving to
RCM::File once file.rb is loaded
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'Gemfile')
0 files changed, 0 insertions, 0 deletions
