1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/flarum_ynh.git synced 2024-09-03 18:36:24 +02:00

Fix activate_flarum_extension helper

This commit is contained in:
tituspijean 2023-01-08 17:05:51 +01:00
parent 43e5c4b18d
commit a440d2121c
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720

View file

@ -45,7 +45,7 @@ activate_flarum_extension() {
# Use jq to test presence of the extension in the list of enabled extensions
# if not, then add it.
new_extensions_enabled=$(jq -jrc --arg short_extension 'if (any(index("$short_extension")) | not) then . |= + $short_extension else . end' <<< $old_extensions_enabled)
new_extensions_enabled=$(jq -jrc --arg short_extension $short_extension '. + [ $short_extension ] | unique' <<< $old_extensions_enabled)
# Update activated extensions list
sql_command="UPDATE \`settings\` SET \`value\`='$new_extensions_enabled' WHERE \`key\`='extensions_enabled';"