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
Kernel version: Linux archlinux 6.11.5-arch1-1 Need a history built-in #1 SMP PREEMPT_DYNAMIC Tue, 22 Oct 2024 18:31:38 +0000 x86_64 GNU/Linux
Terminal: xterm-256color
If two fish instances are started simultaneously and the fish directories (.config/fish etc) do not exist there is a race condition where both shells try to create the directories as part of https://github.com/fish-shell/fish-shell/blob/3.7.1/src/path.cpp#L344. Often one shell will get the EEXIST error code returned and assume an error occurred instead of ignoring it. This causes the erroneous printing of the warning that the directories could not have been created.
root@archlinux ~# set --erase --universal _FISH_WARNED
root@archlinux ~ [4]# rm -r ~/foobar
root@archlinux ~# XDG_DATA_HOME=$PWD/foobar fish & XDG_DATA_HOME=$PWD/foobar fish
error: can not save history
warning-path: Unable to locate data directory derived from $XDG_DATA_HOME: '/root/foobar/fish'.
warning-path: The error was 'File exists'.
warning-path: Please set$XDG_DATA_HOME to a directory where you have write access.
Welcome to fish, the friendly interactive shell
Type helpfor instructions on how to use fish
root@archlinux ~#
In my case this always happens when booting VMs for testing where fish is spawned on tty1 and hvc0 (normal TTY and QEMU hypervisor console) after booting
xterm-256colorIf two fish instances are started simultaneously and the fish directories (
.config/fishetc) do not exist there is a race condition where both shells try to create the directories as part of https://github.com/fish-shell/fish-shell/blob/3.7.1/src/path.cpp#L344. Often one shell will get theEEXISTerror code returned and assume an error occurred instead of ignoring it. This causes the erroneous printing of the warning that the directories could not have been created.In my case this always happens when booting VMs for testing where fish is spawned on
tty1andhvc0(normal TTY and QEMU hypervisor console) after booting