HomeSoftware Heritage

sphinx: Fix the creation of the pre-commit file during the mr update

Description

sphinx: Fix the creation of the pre-commit file during the mr update

Change the default permission of the ~jenkins/.cache directory
created by the --mount option on the RUN command
It fixes all the following errors:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jenkins/.local/bin/pre-commit", line 10, in <module>
    sys.exit(main())
  File "/home/jenkins/.local/lib/python3.7/site-packages/pre_commit/main.py", line 398, in main
    f'Command {args.command} failed to exit with a returncode',
  File "/usr/lib/python3.7/contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/jenkins/.local/lib/python3.7/site-packages/pre_commit/error_handler.py", line 73, in error_handler
    _log_and_exit(msg, ret_code, e, traceback.format_exc())
  File "/home/jenkins/.local/lib/python3.7/site-packages/pre_commit/error_handler.py", line 24, in _log_and_exit
    storedir = Store().directory
  File "/home/jenkins/.local/lib/python3.7/site-packages/pre_commit/store.py", line 52, in __init__
    os.makedirs(self.directory, exist_ok=True)
  File "/usr/lib/python3.7/os.py", line 221, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/jenkins/.cache/pre-commit'

Details

Provenance
vsellierAuthored on May 4 2021, 6:55 PM
vsellierPushed on May 5 2021, 9:37 AM
Differential Revision
D5674: sphinx: Fix the creation of the pre-commit file during the mr update
Parents
rCDFJ35f6509a0a3a: base-buster: Upgrade nodejs from 10.x to 12.x
Branches
Unknown
Tags
Unknown