Merge pull request #1919 from YunoHost/fix-appconfig-panel

appconfig panel: new values were replaced by default values
This commit is contained in:
Alexandre Aubin 2024-07-23 17:31:35 +02:00 committed by GitHub
commit f547ac2515
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1908,9 +1908,10 @@ ynh_app_config_run $1
logger.debug(f"Calling '{action}' action from config script") logger.debug(f"Calling '{action}' action from config script")
app = self.entity app = self.entity
app_setting_path = os.path.join(APPS_SETTING_PATH, self.entity) app_setting_path = os.path.join(APPS_SETTING_PATH, self.entity)
env = _make_environment_for_app_script(app, workdir=app_setting_path) app_script_env = _make_environment_for_app_script(app, workdir=app_setting_path)
app_script_env.update(env)
ret, values = hook_exec(config_script, args=[action], env=env) ret, values = hook_exec(config_script, args=[action], env=app_script_env)
if ret != 0: if ret != 0:
if action == "show": if action == "show":
raise YunohostError("app_config_unable_to_read") raise YunohostError("app_config_unable_to_read")