Skip to content
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
wants to merge 1 commit into from
Closed

Avoid overwriting GIO_EXTRA_MODULES env var #1873

wants to merge 1 commit into from

Conversation

lilyinstarlight
Copy link

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.

@fearphage
Copy link

FYI I'm on Ubuntu 20.04 and the variable is unset.

➜  meh.gQki5Z7 if [ -z ${GIO_EXTRA_MODULES+x} ]; then echo 'variable is unset'; else echo "value is: >$GIO_EXTRA_MODULES<"; fi
variable is unset

@lilyinstarlight
Copy link
Author

FYI I'm on Ubuntu 20.04 and the variable is unset.

Thank you @fearphage! If that's the case, then this change should continue working on Ubuntu with no regression.

@rhoriguchi
Copy link

@dylanaraps could you please merge this. Will fix a downstream issue NixOS/nixpkgs#108903.

hykilpikonna added a commit to hykilpikonna/hyfetch that referenced this pull request Jul 31, 2022
…g GIO_EXTRA_MODULES env var

Upstream PR: dylanaraps/neofetch#1873
Thanks to @lilyinstarlight

Co-authored-by: Lily Foster <lily@lily.flowers>
@hykilpikonna
Copy link

Thank you for your contribution!

This PR is merged into hyfetch since this repo (dylanaraps/neofetch) seems no longer maintained.

HyFetch is a fork of neofetch with LGBTQ pride flags, but the repo also maintains an updated version of the original neofetch, addressing many pull requests that are not merged in the original repo.

Read the "Running Updated Original Neofetch" section for more info!

@lilyinstarlight lilyinstarlight closed this by deleting the head repository Jan 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants