89luca89 / distrobox

Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Mirror available at: https://gitlab.com/89luca89/distrobox
https://distrobox.it/
GNU General Public License v3.0
9.97k stars 410 forks source link

[Error] Additional env vars that conflict with built-in only overwrite if declared first #1594

Open parkerlreed opened 4 hours ago

parkerlreed commented 4 hours ago

Describe the bug When passing in multiple --env arguments within distrobox enter, and it happens to be one that distrobox already uses (like WAYLAND_DISPLAY or QT_AUTO_SCREEN_SCALE_FACTOR), the value only takes effect if it was first to be declared

To Reproduce

--additional-flags "--env WAYLAND_DISPLAY= --env QT_AUTO_SCREEN_SCALE_FACTOR=1"

Correctly overwrites WAYLAND_DISPLAY but then the Qt variable is reset to 0 later in the command line args.

Likewise

--additional-flags "--env QT_AUTO_SCREEN_SCALE_FACTOR=1 --env WAYLAND_DISPLAY="

Correctly overwrites Qt but then WAYLAND_DISPLAY gets superseded by the later command line args.

Expected behavior Both to be taken into account

Logs wayland_first.txt qt_first.txt

Desktop (please complete the following information):

parkerlreed commented 4 hours ago

Seeing this on another system running the same container with podman as the backend. Seemingly the latest distrobox release/git master changed something around this behavior. (Both args were working before this latest round of updates)