mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 00:01:15 -03:00
__fish_cache_put: fix for BusyBox stat
On alpine, tests/checks/check-completions fails with stat: can't read file system information for '%u:%g': No such file or directory
This commit is contained in:
@@ -5,7 +5,11 @@ function __fish_cache_put
|
||||
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
|
||||
if stat --version 2>&1 | string match -q 'BusyBox*'
|
||||
stat -c '%u:%g' $dir
|
||||
else
|
||||
stat --format '%u:%g' $dir 2>/dev/null ||
|
||||
stat -f '%u:%g' $dir
|
||||
end
|
||||
) $cache_file
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user