From dd4f5dbe99ed7ea754dac1a72026e8fc50e5d53e Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Fri, 11 Mar 2016 18:04:01 +0900 Subject: [PATCH] mvn.py: Print failed maven command as a string When a maven command fails, the error message printed includes the command which is rendered as a list. Include the command as a string (joined list) so that it's easier to copy and paste it, to run it manually and see the full output from maven. Change-Id: I95faf7b4464594950086bcddee891513779b4f24 --- tools/maven/mvn.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/maven/mvn.py b/tools/maven/mvn.py index 7017406bc1..83a33e8aa6 100755 --- a/tools/maven/mvn.py +++ b/tools/maven/mvn.py @@ -65,7 +65,8 @@ for spec in args.s: print(' '.join(exe), file=stderr) check_output(exe) except Exception as e: - print('%s command failed: %s' % (args.a, e), file=stderr) + print('%s command failed: %s\n%s' % (args.a, ' '.join(exe), e), + file=stderr) exit(1) with open(args.o, 'w') as fd: