json output on install when an error occurs is not valid
Open
Nobody has claimed this yet.
bug
- Dominant language
- C
- Stars
- 130
- Forks
- 55
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 7
Description
Describe the bug
json output on install when an error occurs is not valid.
Reproduction steps
- run
tdnf install --downloadonly --downloaddir=cherries --installroot=/tmp --releasever=5.0 --nodeps -j -y docker=24.0.5-4.ph5
Note that the directory cherries used as option should not exist for the error to happen.
Output is:
Error processing package: aarch64/docker-24.0.5-4.ph5.aarch64.rpm
{"Install":[{"Name":"docker","Arch":"aarch64","Evr":"24.0.5-4.ph5","InstallSize":0}]}{"Error":1602,"ErrorMessage":"No such file or directory"}
Expected behavior
valid json output.
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the tdnf install --downloadonly --downloaddir=cherries --installroot=/tmp --releasever=5.0 --nodeps -j -y docker=24.0.5-4.ph5 command, ensuring cherries does not exist. Trace the install error path that emits JSON and verify that the completed output is one valid JSON document rather than two adjacent objects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100