Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fish does not create XDG_RUNTIME_DIR if missing #7335

Closed
a-m-s opened this issue Sep 14, 2020 · 1 comment
Closed

Fish does not create XDG_RUNTIME_DIR if missing #7335

a-m-s opened this issue Sep 14, 2020 · 1 comment
Labels
bug Something that's not working as intended
Milestone

Comments

@a-m-s
Copy link

a-m-s commented Sep 14, 2020

The functions env_get_runtime_path and check_runtime_path look like they are intended to create $XDG_RUNTIME_DIR, if it is defined but doesn't exist, but actually fail to do so. The code only uses XDG_RUNTIME_DIR if the directory already exists, and already has the correct access mode. It then silently falls back to the /tmp/fish.$USER that I was trying to avoid.

The problem is that
a) env_get_runtime_path checks access before calling check_runtime_path; this prevents the directory being created. It is also redundant because check_runtime_path will check access anyway.
b) there's no warning or explanation why it's ignoring the user configured directory.

(I discovered this because fish from LinuxBrew appears to be incapable of obtaining my username from QAS on an ancient Ubuntu 14.04 system, meaning that the fallback method doesn't work either. I don't expect this to be a common problem for others. It took a fair amount of searching and code inspection to figure out how to work around the problem.)

@faho faho added the bug Something that's not working as intended label Sep 17, 2020
@faho faho added this to the fish 3.2.0 milestone Sep 17, 2020
@faho faho closed this as completed in 181ce4a Sep 17, 2020
@zanchey
Copy link
Member

zanchey commented Sep 17, 2020

mea culpa!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended
Projects
None yet
Development

No branches or pull requests

3 participants