[Error] distrobox-export issues
- Exported binaries don't start in a login shell, so the user environment variables are not sourced.
For example I have multiple HOMEBREW_* env variables set in .zshenv and export brew binary from a distrobox container. But when running brew on a host, it doesn't source the .zshenv. So I have to manually modify the exported script to add /bin/sh -l -c.
As far as I can see from the commit history it worked before and got changed in this commit: https://github.com/89luca89/distrobox/commit/3b1e312f884cad2185c3b57dcde470a5d7914c61#diff-291967e0db48bedf9e745ebca7eeb5c28d1652ab5baa971642ec682b6b88b1a1
- https://github.com/89luca89/distrobox/blob/867f4f85c762bc74bf398c8654984b801138e154/distrobox-export#L337-L339
I think the extra_flags here are redudant, since they are added in the previous line, which will be called after host-exec.
Similar experience, but instead I can't even export anything now. distrobox-export just dies with
❯ distrobox-export --list-apps
/home/marco/.local/bin//distrobox-export: line 244: CONTAINER_ID: unbound variable
Which is correct, since I'm running in podman, but it should just skip that if check, not die on that line. Can't really see why tho, it should work from my primitive understanding of bash.
Commenting that if branch out still makes it fail with
❯ distrobox-export --list-apps
grep: /run/host/home/marco/.local/share/applications/io.github.fastrizwaan.WineZGUI_BbLauncher.desktop: File o directory non esistente
/home/marco/.local/bin//distrobox-export: line 628: CONTAINER_ID: unbound variable
/home/marco/.local/bin//distrobox-export: line 628: CONTAINER_ID: unbound variable
/home/marco/.local/bin//distrobox-export: line 628: CONTAINER_ID: unbound variable
And taking a look at that line it seems to assume that CONTAINER_ID is set at that point, but I can't see anywhere in distrobox-export a manual assignment to it. Is this intended behaviour?