mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-13 20:40:08 -06:00
Fix user so we can mount volumes as RW
This commit is contained in:
@@ -78,9 +78,11 @@ def run_hook(repo_cmd_runner, hook, file_args):
|
||||
cmd = (
|
||||
'docker', 'run',
|
||||
'--rm',
|
||||
'-v', '{}:/src'.format(os.getcwd()),
|
||||
'-u', '{}:{}'.format(os.getuid(), os.getgid()),
|
||||
'-v', '{}:/src:rw'.format(os.getcwd()),
|
||||
'--workdir', '/src',
|
||||
'--entrypoint', hook['entry'],
|
||||
docker_tag(repo_cmd_runner)
|
||||
)
|
||||
|
||||
return xargs(cmd + tuple(hook['args']), file_args)
|
||||
|
||||
Reference in New Issue
Block a user