mkSymlinkActivationScript: add overall check for existence of source
This commit is contained in:
1 file changed
+2
@@ -12,10 +12,12 @@
|
||||
];
|
||||
|
||||
mkSymlinkActivationScript = {target, source}: ''
|
||||
if [ -e ${source} ]; then
|
||||
if [ -e ${target} ]; then
|
||||
rm -rf ${target}
|
||||
fi
|
||||
ln -s ${source} ${target}
|
||||
fi
|
||||
'';
|
||||
|
||||
attrByStrPath = strPath: set: nixpkgs.lib.attrByPath (nixpkgs.lib.strings.splitString "." strPath) null set;
|
||||
|
||||
Reference in new issue
Block a user