ENVFS_RESOLVE_ALWAYS=1 only works for entries in the fallback-path option
SuperSandro2000 opened this issue · 2 comments
SuperSandro2000 commented
▶ ENVFS_RESOLVE_ALWAYS=1 ls -la /usr/bin/env
lr----x--t root root 0 B Thu Jan 1 01:00:00 1970 /usr/bin/env ⇒ /nix/store/mqvnklaf6mzmj7ng13aph5ymkvzpyhn0-fallback-path/env
▶ ENVFS_RESOLVE_ALWAYS=1 ls -la /usr/bin/systemd-detect-virt
lsd: /usr/bin/systemd-detect-virt: No such file or directory (os error 2).
▶ ENVFS_RESOLVE_ALWAYS=1 ls -la /usr/bin/bash
lsd: /usr/bin/bash: No such file or directory (os error 2).
▶ ENVFS_RESOLVE_ALWAYS=1 ls -la /usr/bin/cat
lsd: /usr/bin/cat: No such file or directory (os error 2).
▶ ENVFS_RESOLVE_ALWAYS=1 ls -la /usr/bin/sh
lr----x--t root root 0 B Thu Jan 1 01:00:00 1970 /usr/bin/sh ⇒ /nix/store/mqvnklaf6mzmj7ng13aph5ymkvzpyhn0-fallback-path/sh
▶ ls /nix/store/mqvnklaf6mzmj7ng13aph5ymkvzpyhn0-fallback-path
env login mount sh wslpath
Mic92 commented
Can you see the binary you are looking for in xargs -0 -n1 echo < /proc/$$/environ | grep PATH=
?
SuperSandro2000 commented
▶ xargs -0 -n1 echo < /proc/$$/environ | grep ^PATH=
PATH=/run/wrappers/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/home/sandro/.nix-profile/bin:/etc/profiles/per-user/sandro/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
▶ which systemd-detect-virt
/run/current-system/sw/bin/systemd-detect-virt