1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/meilisearch_ynh.git synced 2024-09-03 19:45:59 +02:00

Don't import dump when no index is found

This commit is contained in:
Florent 2021-10-08 20:38:07 +02:00 committed by Florent F
parent aba71c9d94
commit e7028ab8e9

View file

@ -180,7 +180,10 @@ yunohost service add $app --description="Opensource next generation search API"
#================================================= #=================================================
ynh_script_progression --message="Import the dump..." --weight=3 ynh_script_progression --message="Import the dump..." --weight=3
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ ${#displayed_attributes[@]} -eq 0 ]
then
ynh_print_warn --message="No index found, database probably empty, skip"
elif [ "$upgrade_type" == "UPGRADE_APP" ]
then then
tmp_dump_logs="$(mktemp -p $DUMPS_DIR)" tmp_dump_logs="$(mktemp -p $DUMPS_DIR)"
ynh_debug --message="Running import command" ynh_debug --message="Running import command"