From c8c15f291bdc9f608d03493d711450dafdce4dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Wed, 30 Sep 2015 01:18:10 +0200 Subject: [PATCH] [fix] Keep -x to show executed commands at hook execution --- lib/yunohost/hook.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/yunohost/hook.py b/lib/yunohost/hook.py index b5b872774..8384ec942 100644 --- a/lib/yunohost/hook.py +++ b/lib/yunohost/hook.py @@ -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)