colcon/colcon-bundle

PermissionsError while executing update_shebang

Closed this issue · 1 comments

We should probably catch the permissions error and throw a warning. It's not fatal since something like this README doesn't need a shebang update anyways.

Extracting apt packages...
[33.832s] ERROR:colcon:colcon bundle: [Errno 13] Permission denied: '/home/ubuntu/environment/nav_stack/husky_ws/bundle/cache/bundle_staging/etc/sudoers.d/README'
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/colcon_core/command.py", line 442, in verb_main
    rc = context.args.main(context=context)
  File "/usr/local/lib/python3.5/dist-packages/colcon_bundle/verb/bundle.py", line 138, in main
    upgrade_deps_graph)
  File "/usr/local/lib/python3.5/dist-packages/colcon_bundle/verb/bundle.py", line 212, in _manage_dependencies
    include_sources=context.args.include_sources)
  File "/usr/local/lib/python3.5/dist-packages/colcon_bundle/verb/_installer_manager.py", line 98, in run_installers
    update_shebang(self.prefix_path)
  File "/usr/local/lib/python3.5/dist-packages/colcon_bundle/verb/utilities.py", line 65, in update_shebang
    with open(file_path, 'rb+') as file_handle:
PermissionError: [Errno 13] Permission denied: '/home/ubuntu/environment/nav_stack/husky_ws/bundle/cache/bundle_staging/etc/sudoers.d/README'

This has been fixed in 0.0.18.