ros-tooling / cross_compile

A tool to build ROS and ROS2 workspaces for various targets
Apache License 2.0
188 stars 60 forks source link

Bad formatting on compilation failure #152

Closed emersonknapp closed 4 years ago

emersonknapp commented 4 years ago

Description

When the cross compile build step fails, the raised exception contains all output lines concatenated by \n. It makes it very hard to read the compiler error!

Expected Behavior

The colcon output is well-formatted on failure.

Actual Behavior

A docker.exceptions.ContainerError is raised with a single string, which is printed out as a single line.

To Reproduce

Add a syntax error to dummy_pkg_ros2 and build

System (please complete the following information)

Additional context

This should be fairly simple to solve, I think we just need to catch the exception and process the output properly, perhaps via output.split('\n')