[fix] Keep -x to show executed commands at hook execution

This commit is contained in:
Jérôme Lebleu 2015-09-30 01:18:10 +02:00
parent 2dd10fd282
commit c8c15f291b

View file

@ -308,7 +308,8 @@ def hook_exec(file, args=None):
p = subprocess.Popen(
['sudo', '-u', 'admin', '-H', 'sh', '-c', 'cd "{:s}" && ' \
'/bin/bash "{:s}" {:s}'.format(file_path, file, arg_str)],
'/bin/bash -x "{:s}" {:s}'.format(
file_path, file, arg_str)],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
shell=False)