Merge pull request #1469 from YunoHost/fix-ynh_user_exists

Escape username for ynh_user_exists
This commit is contained in:
Alexandre Aubin 2022-06-07 12:49:11 +02:00 committed by GitHub
commit 98cfd0909b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@ ynh_user_exists() {
# Manage arguments with getopts
ynh_handle_getopts_args "$@"
yunohost user list --output-as json --quiet | jq -e ".users.${username}" >/dev/null
yunohost user list --output-as json --quiet | jq -e ".users.\"${username}\"" >/dev/null
}
# Retrieve a YunoHost user information