mirror of
https://github.com/nix-community/home-manager
synced 2024-12-22 01:39:47 +01:00
files: avoid surprises when linking files (#3018)
This commit is contained in:
parent
4f0c1afba7
commit
69806e9378
1 changed files with 2 additions and 1 deletions
|
@ -185,8 +185,9 @@ in
|
||||||
$VERBOSE_ECHO "Skipping '$targetPath' as it is identical to '$sourcePath'"
|
$VERBOSE_ECHO "Skipping '$targetPath' as it is identical to '$sourcePath'"
|
||||||
else
|
else
|
||||||
# Place that symlink, --force
|
# Place that symlink, --force
|
||||||
|
# This can still fail if the target is a directory, in which case we bail out.
|
||||||
$DRY_RUN_CMD mkdir -p $VERBOSE_ARG "$(dirname "$targetPath")"
|
$DRY_RUN_CMD mkdir -p $VERBOSE_ARG "$(dirname "$targetPath")"
|
||||||
$DRY_RUN_CMD ln -nsf $VERBOSE_ARG "$sourcePath" "$targetPath"
|
$DRY_RUN_CMD ln -Tsf $VERBOSE_ARG "$sourcePath" "$targetPath" || exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue