Warn the user that ynh_secure_remove should be used with only one argument

This commit is contained in:
Alexandre Aubin 2019-01-29 01:51:52 +01:00
parent 5817d804a2
commit 68b01ae6ec

View file

@ -348,6 +348,11 @@ ynh_secure_remove () {
/var/www \
/home/yunohost.app"
if [[ -n "$2" ]]
then
echo "/!\ Packager ! You provided a second argument to ynh_secure_remove but it will be ignored... Use this helper with one argument at time." >&2
fi
if [[ "$forbidden_path" =~ "$path_to_remove" \
# Match all paths or subpaths in $forbidden_path
|| "$path_to_remove" =~ ^/[[:alnum:]]+$ \