mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
stdenv moveToOutput: move even broken symlinks
I believe this reduces surprises and is actually simpler semantically. This is important e.g. for relative symlinks when moving both source and target - now the order of moving won't matter. Fixes #20723 (a particular instance of the surprise).
This commit is contained in:
parent
7a88f314cb
commit
97853c07d7
1 changed files with 2 additions and 1 deletions
|
@ -98,7 +98,8 @@ moveToOutput() {
|
|||
if [ "${!output}" = "$dstOut" ]; then continue; fi
|
||||
local srcPath
|
||||
for srcPath in "${!output}"/$patt; do
|
||||
if [ ! -e "$srcPath" ]; then continue; fi
|
||||
# apply to existing files/dirs, *including* broken symlinks
|
||||
if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then continue; fi
|
||||
|
||||
if [ "$dstOut" = REMOVE ]; then
|
||||
echo "Removing $srcPath"
|
||||
|
|
Loading…
Reference in a new issue