vim-utils: better error message if duplicates

Print a more user friendly error message if you try to in install
multiple plugins with the same name
closes #145980 #146099
This commit is contained in:
José Luis Lafuente 2021-11-16 13:24:47 +01:00 committed by Bjørn Forsman
parent f895817548
commit 19b22191f7

View file

@ -199,6 +199,10 @@ let
linkVimlPlugin = plugin: packageName: dir: ''
mkdir -p $out/pack/${packageName}/${dir}
if test -e "$out/pack/${packageName}/${dir}/${lib.getName plugin}"; then
printf "\nERROR - Duplicated vim plugin: ${lib.getName plugin}\n\n"
exit 1
fi
ln -sf ${plugin}/${rtpPath} $out/pack/${packageName}/${dir}/${lib.getName plugin}
'';