helpers: fix 'ls: cannot access <folder> No such file or directory' errors on CI

This commit is contained in:
OniriCorpe 2024-04-14 20:02:16 +02:00
parent 5e4e59a133
commit 537699ca90

View file

@ -843,7 +843,7 @@ ynh_get_debian_release() {
_acceptable_path_to_delete() {
local file=$1
local forbidden_paths=$(ls -d / /* /{var,home,usr}/* /etc/{default,sudoers.d,yunohost,cron*} /etc/yunohost/{apps,domains,hooks.d} /opt/yunohost)
local forbidden_paths=$(ls -d / /* /{var,home,usr}/* /etc/{default,sudoers.d,yunohost,cron*} /etc/yunohost/{apps,domains,hooks.d} /opt/yunohost 2> /dev/null)
# Legacy : A couple apps still have data in /home/$app ...
if [[ -n "${app:-}" ]]