c.f. change in the moulinette regarding call_async_output and the handling of stdinfo ... YNH_STDINFO is now a file descriptor instead of a named pipe

This commit is contained in:
Alexandre Aubin 2021-01-01 04:04:56 +01:00
parent 299e04cfc7
commit 86a612fab1
2 changed files with 2 additions and 8 deletions

View file

@ -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

View file

@ -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: