You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
XDG_CONFIG_HOME no longer allows a UID without a home directory to have config files #18902
I have done a basic search of the issue tracker to find any existing issues that are similar.
I have checked that my version is at least the latest stable release available via my installation method.
Describe the bug
In environments like rpm-ostree (Fedora Silverblue and family) and containerized setups, it is typical to run as a UID and GID without an actual user, and therefore without a home directory. In rpm-ostree in particular, a UID without a homedir is used when installing packages, because they install into a container image, not onto the local environment.
But as of v0.115.0, this no longer works. It looks like nu fails to find the home directory, and fails to set the config home entirely. This prevents me from installing the current versions of nushell in my Fedora atomic setup.
Note that if I do set the HOME env var explicitly, it works fine, but still writes to the XDG_CONFIG_HOME dir. It also works if the user account has a home, and HOME is explicitly unset, while XDG_CONFIG_HOME is set.
How to reproduce
Install nushell v0.114.1 and v0.115.0 (and the latest state of main, to verify that it is still an issue)
As root, run python3 -c 'import os; os.setgid(12345); os.setuid(12345); os.execl("/bin/bash", "/bin/bash", "-i");' to switch to an arbitrary uid and gid (one that doesn't exist as a user on the system).
Run different versions of nushell with XDG_CONFIG_HOME=$(mktemp -d), like env "XDG_CONFIG_HOME=$(mktemp -d)" /path/to/nu
Expected behavior
I expect XDG_CONFIG_HOME to work even when HOME isn't set and the user doesn't have a usable home. It makes sense to error when none of these needed things is available, but an explicit XDG_CONFIG_HOME should work regardless.
With PR 78 merged and released on the integrations repo, I'm now able to install the newest version on rpm-ostree, fortunately. That's still a workaround, though, and not a fix for the underlying issue.
Activity
Taywee commentedon Aug 26, 2026
With PR 78 merged and released on the integrations repo, I'm now able to install the newest version on rpm-ostree, fortunately. That's still a workaround, though, and not a fix for the underlying issue.
fix(config): keep XDG config when there is no home directory (nushell…