mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Fix user so we can mount volumes as RW
This commit is contained in:
parent
9b92f96ed0
commit
baf254ab78
1 changed files with 3 additions and 1 deletions
|
|
@ -78,9 +78,11 @@ def run_hook(repo_cmd_runner, hook, file_args):
|
||||||
cmd = (
|
cmd = (
|
||||||
'docker', 'run',
|
'docker', 'run',
|
||||||
'--rm',
|
'--rm',
|
||||||
'-v', '{}:/src'.format(os.getcwd()),
|
'-u', '{}:{}'.format(os.getuid(), os.getgid()),
|
||||||
|
'-v', '{}:/src:rw'.format(os.getcwd()),
|
||||||
'--workdir', '/src',
|
'--workdir', '/src',
|
||||||
'--entrypoint', hook['entry'],
|
'--entrypoint', hook['entry'],
|
||||||
docker_tag(repo_cmd_runner)
|
docker_tag(repo_cmd_runner)
|
||||||
)
|
)
|
||||||
|
|
||||||
return xargs(cmd + tuple(hook['args']), file_args)
|
return xargs(cmd + tuple(hook['args']), file_args)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue