nix-store --add doesn't update refrences properly
lolbinarycat opened this issue · comments
lolbinarycat commented
Steps To Reproduce
$ mkdir /tmp/gcbug
$ ln -s $(realpath /bin/sh) /tmpgcbug/sh
$ nix-store -q --tree $(nix-store --add /tmp/gcbug)
/nix/store/zk2qklkcilxpsxf0xbsi65g0b02ywaj2-gcbug
Expected behavior
the closure of the added path should contain bash.
nix-env --version
output
nix-env (Nix) 2.18.1
Additional context
this causes store paths to be garbage collected while still alive. this should not ever happen.
Priorities
Add 👍 to issues you find important.