def run_hook( hook: Hook, file_args: Sequence[str], color: bool, ) -> tuple[int, bytes]: # pragma: win32 no cover cmd = docker_cmd() + hook.cmd return helpers.run_xargs(hook, cmd, file_args, color=color)
def run_hook( hook: Hook, file_args: Sequence[str], color: bool, ) -> Tuple[int, bytes]: cmd = (hook.prefix.path(hook.cmd[0]), *hook.cmd[1:]) return helpers.run_xargs(hook, cmd, file_args, color=color)
def run_hook(hook: Hook, file_args: Sequence[str], color: bool,) -> Tuple[int, bytes]: # TODO: Some rare commands need to be run using `conda run` but mostly we # can run them withot which is much quicker and produces a better # output. # cmd = ('conda', 'run', '-p', env_dir) + hook.cmd with in_env(hook.prefix, hook.language_version): return helpers.run_xargs(hook, hook.cmd, file_args, color=color)
def run_hook( hook: Hook, file_args: Sequence[str], color: bool, ) -> tuple[int, bytes]: # pragma: win32 no cover with in_env(hook.prefix): return helpers.run_xargs(hook, hook.cmd, file_args, color=color)
def run_hook( hook: Hook, file_args: Sequence[str], color: bool, ) -> Tuple[int, bytes]: with in_env(hook.prefix, hook.language_version): return helpers.run_xargs(hook, hook.cmd, file_args, color=color)
def run_hook( hook: Hook, file_args: Sequence[str], color: bool, ) -> Tuple[int, bytes]: # pragma: windows no cover assert_docker_available() cmd = docker_cmd() + hook.cmd return helpers.run_xargs(hook, cmd, file_args, color=color)
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(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( hook: Hook, file_args: Sequence[str], color: bool, ) -> Tuple[int, bytes]: # pragma: win32 no cover # 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) entry_exe, *cmd_rest = hook.cmd entry_tag = ('--entrypoint', entry_exe, docker_tag(hook.prefix)) cmd = (*docker_cmd(), *entry_tag, *cmd_rest) return helpers.run_xargs(hook, cmd, file_args, color=color)
def run_hook( hook: 'Hook', file_args: Sequence[str], color: bool, ) -> Tuple[int, bytes]: # 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 = hook.cmd 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, color=color)
def run_hook(hook, file_args, color): cmd = hook.cmd cmd = (hook.prefix.path(cmd[0]), ) + cmd[1:] return helpers.run_xargs(hook, cmd, file_args, color=color)
def run_hook(prefix, hook, file_args): return helpers.run_xargs(hook, helpers.to_cmd(hook), file_args)
def run_hook( hook: Hook, file_args: Sequence[str], color: bool, ) -> Tuple[int, bytes]: return helpers.run_xargs(hook, hook.cmd, file_args, color=color)
def run_hook(hook, file_args, color): return helpers.run_xargs(hook, hook.cmd, file_args, color=color)
def run_hook(hook, file_args, color): with in_env(hook.prefix): return helpers.run_xargs(hook, hook.cmd, file_args, color=color)
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): with in_env(hook.prefix): 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(hook, file_args, color): # pragma: windows no cover assert_docker_available() cmd = docker_cmd() + hook.cmd return helpers.run_xargs(hook, cmd, file_args, color=color)
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)
def run_hook(hook, file_args, color): # pragma: windows no cover with in_env(hook.prefix): return helpers.run_xargs(hook, hook.cmd, file_args, color=color)
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): # 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): 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, color): with in_env(hook.prefix, hook.language_version): return helpers.run_xargs(hook, hook.cmd, file_args, color=color)
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): with in_env(hook.prefix, hook.language_version): return helpers.run_xargs(hook, helpers.to_cmd(hook), file_args)