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
This commit is contained in:
David Pursehouse
2016-03-11 18:04:01 +09:00
parent e81cc45e12
commit dd4f5dbe99

View File

@@ -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: