revert back to printing python lists

Summary: public
but keep the copy-pastability by wrapping the list into a small standalone
script that can be copy-pasted on the command line.

Reviewed By: jeremydubreil

Differential Revision: D2636536

fb-gh-sync-id: 7c689e2
master
Jules Villard 9 years ago committed by facebook-github-bot-7
parent 674c199605
commit 80af77a528

@ -86,9 +86,17 @@ class CompilerCall:
try:
subprocess.check_call(javac_cmd, stderr=file_out)
except subprocess.CalledProcessError:
error_msg = 'ERROR: Failed to run the following compilation command:\n\n {}\n'
failing_cmd = ' '.join(['"%s"' % arg for arg in javac_cmd
if arg != '-verbose'])
error_msg = 'ERROR: failure during compilation command.' \
+ '\nYou can run the failing compilation ' \
+ 'command again by copy-pasting the\nlines ' \
+ 'below in your terminal:\n\n"""\n' \
+ 'python <<EOF\n' \
+ 'import subprocess\n' \
+ 'cmd = {}\n' \
+ 'subprocess.check_call(cmd)\n' \
+ 'EOF\n"""\n'
failing_cmd = filter(lambda arg: arg != '-verbose',
javac_cmd)
utils.error(error_msg.format(failing_cmd))
subprocess.check_call(failing_cmd)

Loading…
Cancel
Save