pkgxdev / libpkgx

`import`… but with pkging powers
https://npmjs.com/libpkgx
Apache License 2.0
62 stars 11 forks source link

`libpkgx` sets `XDG_DATA_DIRS` in some cases #70

Open jhheider opened 4 months ago

jhheider commented 4 months ago

it appears that this interferes with the proper functioning of e.g. gsettings from GNOME. since tools use the standard-defined defaults if the value is unset, i think we need to consider that if we add values to it, we must first add the standards-defined fallback to prevent changing behavior. see the below thread for an example of how it interfere's with GNOME's tooling.

          Oh. Maybe we have a bug in pkgx then?
❯ env | grep XDG
XDG_RUNTIME_DIR=/run/user/1002/

❯ pkgx env | grep XDG
XDG_DATA_DIRS=/home/felipecrs/.pkgx/gnu.org/coreutils/v9.5.0/share
XDG_RUNTIME_DIR=/run/user/1002/

If pkgx was not supposed to alter XDG_ vars in runtime, then it was not supposed to inject XDG_DATA_DIRS either, I suppose.

Originally posted by @felipecrs in https://github.com/pkgxdev/pantry/issues/5991#issuecomment-2081165688