This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Avoid overwriting GIO_EXTRA_MODULES env var #1873
Closed
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 fix for #949 introduced a regression in environments where
GIO_EXTRA_MODULES
is already set (and different from the provided value of/usr/lib/x86_64-linux-gnu/gio/modules/
). This PR checks if the variable is already set before overwriting it.I was personally experiencing an issue with incorrect themes being reported on NixOS that seemed to be directly caused by overwriting the existing
GIO_EXTRA_MODULES
environment variable. Using this patch fixed the issue.I'm not sure if the issue @fearphage had in #949 was due to the variable being unset entirely or set to something incorrect, so this should probably be tested on other systems (especially Ubuntu, judging by #949) to ensure there is no regression. Alternatively, just appending
/usr/lib/x86_64-linux-gnu/gio/modules/
to the end of the variable if it already exists would possibly work, but I've not tested this.