mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Simplify command call, no need to wrap this in a dummy 'sh -c'
This commit is contained in:
parent
14f6f09993
commit
d6d45cf7a6
1 changed files with 5 additions and 8 deletions
|
@ -390,18 +390,15 @@ def _hook_exec_bash(path, args, chdir, env, return_format, loggers):
|
|||
f.write('')
|
||||
env['YNH_STDRETURN'] = stdreturn
|
||||
|
||||
# Construct command to execute
|
||||
command = ['sh', '-c']
|
||||
|
||||
# use xtrace on fd 7 which is redirected to stdout
|
||||
cmd = 'BASH_XTRACEFD=7 /bin/bash -x "{script}" {args} 7>&1'
|
||||
env['BASH_XTRACEFD'] = 7
|
||||
cmd = '/bin/bash -x "{script}" {args} 7>&1'
|
||||
cmd = cmd.format(script=cmd_script, args=cmd_args)
|
||||
|
||||
command.append(cmd.format(script=cmd_script, args=cmd_args))
|
||||
|
||||
logger.debug("Executing command '%s'" % ' '.join(command))
|
||||
logger.debug("Executing command '%s'" % cmd)
|
||||
|
||||
returncode = call_async_output(
|
||||
command, loggers, shell=False, cwd=chdir,
|
||||
cmd, loggers, shell=True, cwd=chdir,
|
||||
stdinfo=stdinfo, env=env
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue