def run_hook(repo_cmd_runner, hook, file_args): # pragma: windows no cover assert_docker_available() # Rebuild the docker image in case it has gone missing, as many people do # automated cleanup of docker images. build_docker_image(repo_cmd_runner, pull=False) hook_cmd = helpers.to_cmd(hook) entry_executable, cmd_rest = hook_cmd[0], hook_cmd[1:] cmd = ( 'docker', 'run', '--rm', '-u', '{}:{}'.format(os.getuid(), os.getgid()), '-v', '{}:/src:rw'.format(os.getcwd()), '--workdir', '/src', '--entrypoint', entry_executable, docker_tag(repo_cmd_runner), ) + cmd_rest return xargs(cmd, file_args)
def run_hook(hook, file_args): # pragma: windows no cover assert_docker_available() # Rebuild the docker image in case it has gone missing, as many people do # automated cleanup of docker images. build_docker_image(hook.prefix, pull=False) hook_cmd = helpers.to_cmd(hook) entry_exe, cmd_rest = hook_cmd[0], hook_cmd[1:] entry_tag = ('--entrypoint', entry_exe, docker_tag(hook.prefix)) cmd = docker_cmd() + entry_tag + cmd_rest return helpers.run_xargs(hook, cmd, file_args)
def run_hook(repo_cmd_runner, hook, file_args): # pragma: windows no cover assert_docker_available() # Rebuild the docker image in case it has gone missing, as many people do # automated cleanup of docker images. build_docker_image(repo_cmd_runner, pull=False) hook_cmd = helpers.to_cmd(hook) entry_executable, cmd_rest = hook_cmd[0], hook_cmd[1:] cmd = ( 'docker', 'run', '--rm', '-u', '{}:{}'.format(os.getuid(), os.getgid()), '-v', '{}:/src:rw'.format(os.getcwd()), '--workdir', '/src', '--entrypoint', entry_executable, docker_tag(repo_cmd_runner) ) + cmd_rest return xargs(cmd, file_args)
def run_hook(repo_cmd_runner, hook, file_args): cmd = helpers.to_cmd(hook) cmd = (repo_cmd_runner.prefix_dir + cmd[0],) + cmd[1:] return xargs(cmd, file_args)
def run_hook(repo_cmd_runner, hook, file_args): with in_env(repo_cmd_runner, hook['language_version']): return xargs(helpers.to_cmd(hook), file_args)
def run_hook(repo_cmd_runner, hook, file_args): # pragma: windows no cover with in_env(repo_cmd_runner): return xargs(helpers.to_cmd(hook), file_args)
def run_hook(prefix, hook, file_args): # pragma: windows no cover with in_env(prefix, hook['language_version']): return xargs(helpers.to_cmd(hook), file_args)
def run_hook(repo_cmd_runner, hook, file_args): # pragma: windows no cover assert_docker_available() cmd = docker_cmd() + helpers.to_cmd(hook) return xargs(cmd, file_args)
def run_hook(hook, file_args): with in_env(hook.prefix, hook.language_version): return helpers.run_xargs(hook, helpers.to_cmd(hook), file_args)
def run_hook(repo_cmd_runner, hook, file_args): cmd = helpers.to_cmd(hook) cmd = (repo_cmd_runner.prefix_dir + cmd[0], ) + cmd[1:] return xargs(cmd, file_args)
def run_hook(hook, file_args): # pragma: windows no cover with in_env(hook.prefix): return helpers.run_xargs(hook, helpers.to_cmd(hook), file_args)
def run_hook(hook, file_args): # pragma: windows no cover assert_docker_available() cmd = docker_cmd() + helpers.to_cmd(hook) return helpers.run_xargs(hook, cmd, file_args)
def run_hook(hook, file_args): cmd = helpers.to_cmd(hook) cmd = (hook.prefix.path(cmd[0]), ) + cmd[1:] return helpers.run_xargs(hook, cmd, file_args)
def run_hook(hook, file_args): with in_env(hook.prefix): return helpers.run_xargs(hook, helpers.to_cmd(hook), file_args)
def run_hook(hook, file_args): return helpers.run_xargs(hook, helpers.to_cmd(hook), file_args)
def run_hook(hook, file_args): cmd = helpers.to_cmd(hook) cmd = (hook.prefix.path(cmd[0]),) + cmd[1:] return helpers.run_xargs(hook, cmd, file_args)
def run_hook(repo_cmd_runner, hook, file_args): # pragma: windows no cover with in_env(repo_cmd_runner, hook['language_version']): return xargs(helpers.to_cmd(hook), file_args)
def run_hook(repo_cmd_runner, hook, file_args): with in_env(repo_cmd_runner): return xargs(helpers.to_cmd(hook), file_args)
def run_hook(prefix, hook, file_args): return helpers.run_xargs(hook, helpers.to_cmd(hook), file_args)
def run_hook(prefix, hook, file_args): with in_env(prefix): return xargs(helpers.to_cmd(hook), file_args)
def run_hook(prefix, hook, file_args): cmd = helpers.to_cmd(hook) cmd = (prefix.path(cmd[0]), ) + cmd[1:] return xargs(cmd, file_args)
def run_hook(prefix, hook, file_args): with in_env(prefix, hook['language_version']): return helpers.run_xargs(hook, helpers.to_cmd(hook), file_args)