Be more resilient in case upgrade/backup/restore script dont exist for some reason

This commit is contained in:
Alexandre Aubin 2023-01-11 09:46:19 +01:00
parent 0f9b9aec73
commit 9fc8e0fb78

View file

@ -803,7 +803,7 @@ class App(TestSuite):
if app_packaging_format <= 1: if app_packaging_format <= 1:
return return
cmd = f"grep -IhEro 'ynh_\w+' '{app.path}/scripts/install' '{app.path}/scripts/remove' '{app.path}/scripts/upgrade' '{app.path}/scripts/backup' '{app.path}/scripts/restore'" cmd = f"grep -IhEro 'ynh_\w+' '{app.path}/scripts/install' '{app.path}/scripts/remove' '{app.path}/scripts/upgrade' '{app.path}/scripts/backup' '{app.path}/scripts/restore' || true"
helpers_used = ( helpers_used = (
subprocess.check_output(cmd, shell=True).decode("utf-8").strip().split("\n") subprocess.check_output(cmd, shell=True).decode("utf-8").strip().split("\n")
) )