Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --follow_symlink to ynh_secure_remove #1716

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Next Next commit
ynh_secure_remove: do not check $# but the number of files.
  • Loading branch information
Salamandar committed Sep 28, 2023
commit ce90d7227c857919c4adb7bae5dd42e2b6157268
5 changes: 3 additions & 2 deletions helpers/utils
Original file line number Diff line number Diff line change
Expand Up @@ -866,8 +866,9 @@ ynh_secure_remove() {
ynh_handle_getopts_args "$@"
set +o xtrace # set +x

if [ $# -ge 2 ]; then
ynh_print_warn --message="/!\ Packager ! You provided more than one argument to ynh_secure_remove but it will be ignored... Use this helper with one argument at time."
if [[ "$file" == *";"* ]]; then
ynh_print_err --message="/!\ Packager ! You provided more than one file to ynh_secure_remove but it will be ignored... Use this helper with one argument at time."
file=${file%;*}
fi

if [[ -z "$file" ]]; then
Expand Down