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

Build outputs are not `chown`ed to the current user if build fails #153

Closed emersonknapp closed 3 years ago

emersonknapp commented 4 years ago

Description

At the end of cross-compilation, the build and install directory are chowned to the invoking user (build step is run as root in the container). However, if the build fails, this step isn't run

Expected Behavior

After the build is done, I can easily modify or remove build and install outputs.

Actual Behavior

If the build fails, the ownership of the files is not changed. This shows up as an error failing to remove the /tmp outputs in the run_e2e_test.sh script, if the build fails.

To Reproduce

System (please complete the following information)

Additional context

This should be solvable with an exit hook in the build_workspace.sh script