Merge pull request #1582 from fflorent/patch-1

Fixes $app unbound when running ynh_secure_remove
This commit is contained in:
Alexandre Aubin 2023-02-02 16:36:08 +01:00 committed by GitHub
commit e7d5d3942e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -718,7 +718,7 @@ _acceptable_path_to_delete() {
local forbidden_paths=$(ls -d / /* /{var,home,usr}/* /etc/{default,sudoers.d,yunohost,cron*})
# Legacy : A couple apps still have data in /home/$app ...
if [[ -n "$app" ]]
if [[ -n "${app:-}" ]]
then
forbidden_paths=$(echo "$forbidden_paths" | grep -v "/home/$app")
fi