mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
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:
parent
299e04cfc7
commit
86a612fab1
2 changed files with 2 additions and 8 deletions
|
@ -35,7 +35,7 @@ ynh_print_info() {
|
||||||
# Manage arguments with getopts
|
# Manage arguments with getopts
|
||||||
ynh_handle_getopts_args "$@"
|
ynh_handle_getopts_args "$@"
|
||||||
|
|
||||||
echo "$message" >> "$YNH_STDINFO"
|
echo "$message" >&$YNH_STDINFO
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ignore the yunohost-cli log to prevent errors with conditional commands
|
# Ignore the yunohost-cli log to prevent errors with conditional commands
|
||||||
|
|
|
@ -387,9 +387,6 @@ def _hook_exec_bash(path, args, no_trace, chdir, env, user, return_format, logge
|
||||||
|
|
||||||
env['YNH_INTERFACE'] = msettings.get('interface')
|
env['YNH_INTERFACE'] = msettings.get('interface')
|
||||||
|
|
||||||
stdinfo = os.path.join(tempfile.mkdtemp(), "stdinfo")
|
|
||||||
env['YNH_STDINFO'] = stdinfo
|
|
||||||
|
|
||||||
stdreturn = os.path.join(tempfile.mkdtemp(), "stdreturn")
|
stdreturn = os.path.join(tempfile.mkdtemp(), "stdreturn")
|
||||||
with open(stdreturn, 'w') as f:
|
with open(stdreturn, 'w') as f:
|
||||||
f.write('')
|
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))
|
logger.debug("Executing command '%s'" % ' '.join(command))
|
||||||
|
|
||||||
returncode = call_async_output(
|
returncode = call_async_output(command, loggers, shell=False, cwd=chdir)
|
||||||
command, loggers, shell=False, cwd=chdir,
|
|
||||||
stdinfo=stdinfo
|
|
||||||
)
|
|
||||||
|
|
||||||
raw_content = None
|
raw_content = None
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Reference in a new issue