diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 403e76cc4..24229571d 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -489,7 +489,9 @@ def app_change_url(auth, app, domain, path): os.system('chmod +x %s' % os.path.join(os.path.join(APP_TMP_FOLDER, "scripts", "change_url"))) # XXX journal - if hook_exec(os.path.join(APP_TMP_FOLDER, 'scripts/change_url'), args=args_list, env=env_dict, user="root") != 0: + if hook_exec(os.path.join(APP_TMP_FOLDER, 'scripts/change_url'), + args=args_list, env=env_dict, user="root", + enable_stdinfo=True) != 0: logger.error("Failed to change '%s' url." % app) # restore values modified by app_checkurl @@ -603,7 +605,9 @@ def app_upgrade(auth, app=[], url=None, file=None): # Execute App upgrade script os.system('chown -hR admin: %s' % INSTALL_TMP) - if hook_exec(extracted_app_folder + '/scripts/upgrade', args=args_list, env=env_dict, user="root") != 0: + if hook_exec(extracted_app_folder + '/scripts/upgrade', + args=args_list, env=env_dict, user="root", + enable_stdinfo=True) != 0: logger.error(m18n.n('app_upgrade_failed', app=app_instance_name)) else: now = int(time.time()) @@ -738,7 +742,7 @@ def app_install(auth, app, label=None, args=None, no_remove_on_failure=False): try: install_retcode = hook_exec( os.path.join(extracted_app_folder, 'scripts/install'), - args=args_list, env=env_dict, user="root") + args=args_list, env=env_dict, user="root", enable_stdinfo=True) except (KeyboardInterrupt, EOFError): install_retcode = -1 except: @@ -755,7 +759,8 @@ def app_install(auth, app, label=None, args=None, no_remove_on_failure=False): # Execute remove script remove_retcode = hook_exec( os.path.join(extracted_app_folder, 'scripts/remove'), - args=[app_instance_name], env=env_dict_remove, user="root") + args=[app_instance_name], env=env_dict_remove, user="root", + enable_stdinfo=True) if remove_retcode != 0: logger.warning(m18n.n('app_not_properly_removed', app=app_instance_name)) @@ -826,7 +831,8 @@ def app_remove(auth, app): env_dict["YNH_APP_INSTANCE_NAME"] = app env_dict["YNH_APP_INSTANCE_NUMBER"] = str(app_instance_nb) - if hook_exec('/tmp/yunohost_remove/scripts/remove', args=args_list, env=env_dict, user="root") == 0: + if hook_exec('/tmp/yunohost_remove/scripts/remove', args=args_list, + env=env_dict, user="root", enable_stdinfo=True) == 0: logger.success(m18n.n('app_removed', app=app)) if os.path.exists(app_setting_path):