Prevent exception while running BorgVersionJob with unexpected lines on stderr #1934
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The borg job logic expects the
profile_name
key to be unconditionally present in the params if any data is received on stderr. This causes the BorgVersionJob (which didn’t set this param) to fail if any unexpected output – such as LD_PRELOAD warnings – in generated while runningborg --version
. This in turn causes Vorta to silently (other than an unrelated looking exception in the console output) fall back to assuming borg 1.1.0 as the borg version.Related Issue
Please don’t make me create an issue for this…
Motivation and Context
Borg version detection currently silently fails in environments that have LD_PRELOAD set in a way to causes warnings to be emitted.
How Has This Been Tested?
The change is pretty trivial, so I just tested with and without.
Types of changes
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.