diff --git a/locales/en.json b/locales/en.json index 642f66162..e74d7d013 100644 --- a/locales/en.json +++ b/locales/en.json @@ -94,8 +94,8 @@ "hook_list_by_invalid" : "Invalid property to list hook by", "hook_name_unknown" : "Unknown hook name '{:s}'", - "hook_exec_failed" : "Script execution failed", - "hook_exec_not_terminated" : "Script execution hasn’t terminated", + "hook_exec_failed" : "Script execution failed: {path:s}", + "hook_exec_not_terminated" : "Script execution hasn’t terminated: {path:s}", "mountpoint_unknown" : "Unknown mountpoint", "unit_unknown" : "Unknown unit '{:s}'", diff --git a/src/yunohost/hook.py b/src/yunohost/hook.py index 2b0902b6f..1365c8289 100644 --- a/src/yunohost/hook.py +++ b/src/yunohost/hook.py @@ -330,12 +330,12 @@ def hook_exec(path, args=None, raise_on_error=False, no_trace=False): # Check and return process' return code if returncode is None: if raise_on_error: - raise MoulinetteError(m18n.n('hook_exec_not_terminated')) + raise MoulinetteError(m18n.n('hook_exec_not_terminated', path=path)) else: - logger.error(m18n.n('hook_exec_not_terminated')) + logger.error(m18n.n('hook_exec_not_terminated', path=path)) return 1 elif raise_on_error and returncode != 0: - raise MoulinetteError(m18n.n('hook_exec_failed')) + raise MoulinetteError(m18n.n('hook_exec_failed', path=path)) return returncode