Commit 2f6e8e3
bib: fix missing dnf detection
The existing code was checking if dnf could be run with --version
to detect if dnf is installed at all. That is wrong, dnf can
fail when it is just run with --version, e.g.:
```
Failed to open log file: /var/log/hawkey.log
4.14.0
```
But errors like this should be surfaced to the user (which
the next call to dnf will do). So instead of running dnf
just run:
```
sh -c "command -v dnf"
```
to check if its available. This will fix the test failures
in osbuild/image-builder-cli#374
Note that the detection is covered by an existing test so
no new test needs adding.1 parent 9add0c0 commit 2f6e8e3
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
0 commit comments