diff --git a/data/helpers.d/logging b/data/helpers.d/logging index 45b5b7e67..dc32ecba9 100644 --- a/data/helpers.d/logging +++ b/data/helpers.d/logging @@ -35,7 +35,7 @@ ynh_print_info() { # Manage arguments with getopts ynh_handle_getopts_args "$@" - echo "$message" >> "$YNH_STDINFO" + echo "$message" >&$YNH_STDINFO } # Ignore the yunohost-cli log to prevent errors with conditional commands diff --git a/src/yunohost/hook.py b/src/yunohost/hook.py index eafcaf825..94126fd36 100644 --- a/src/yunohost/hook.py +++ b/src/yunohost/hook.py @@ -387,9 +387,6 @@ def _hook_exec_bash(path, args, no_trace, chdir, env, user, return_format, logge env['YNH_INTERFACE'] = msettings.get('interface') - stdinfo = os.path.join(tempfile.mkdtemp(), "stdinfo") - env['YNH_STDINFO'] = stdinfo - stdreturn = os.path.join(tempfile.mkdtemp(), "stdreturn") with open(stdreturn, 'w') as f: f.write('') @@ -415,10 +412,7 @@ def _hook_exec_bash(path, args, no_trace, chdir, env, user, return_format, logge logger.debug("Executing command '%s'" % ' '.join(command)) - returncode = call_async_output( - command, loggers, shell=False, cwd=chdir, - stdinfo=stdinfo - ) + returncode = call_async_output(command, loggers, shell=False, cwd=chdir) raw_content = None try: