Logo
Explore Help
Sign In
h/fish-shell
1
Fork 0
You've already forked fish-shell
mirror of https://github.com/fish-shell/fish-shell.git synced 2026-05-18 17:11:15 -03:00
Code Issues Packages Projects Releases Wiki Activity
Files
4e68f8a130841bed269f265f668a558af740c75e
fish-shell/share/functions/__fish_cache_put.fish

12 lines
334 B
Fish
Raw Normal View History

Mark private functions that don't need localization See the next commit. Part of #11833 (cherry picked from commit a53db72564f9b5da80f61524bd899b282d3d7bd7)
2025-09-29 09:30:35 +02:00
# localization: skip(private)
Use the cache directory owner for cache entries Commit f086bc9564 (Maintain ownership when rewriting universal variables file, 2015-09-26) fixed an issue where "sudo -E fish" would create root-owned ~/.config/fish/fish_variables that break the users's shell. A simlar issue exists for files in ~/.cache/fish; fix that. Note that ~/.cache/fish is currently created on first run when we generate completions from manpages. See the issue described in #11292
2025-03-21 10:31:01 +01:00
function __fish_cache_put
set -l cache_file $argv[1]
touch $cache_file
set -l dir (path dirname $cache_file)
chown --reference=$dir $cache_file 2>/dev/null ||
chown (
stat --format '%u:%g' $dir 2>/dev/null ||
stat -f '%u:%g' $dir
) $cache_file
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 133ms Template: 10ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API