mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
fixed path to binary
This commit is contained in:
parent
b271060aef
commit
c68ef12484
1 changed files with 3 additions and 3 deletions
|
|
@ -4,7 +4,6 @@ import os
|
||||||
|
|
||||||
from pre_commit.languages import helpers
|
from pre_commit.languages import helpers
|
||||||
from pre_commit.util import clean_path_on_failure
|
from pre_commit.util import clean_path_on_failure
|
||||||
from pre_commit.util import cwd
|
|
||||||
from pre_commit.xargs import xargs
|
from pre_commit.xargs import xargs
|
||||||
|
|
||||||
ENVIRONMENT_DIR = 'swift_env'
|
ENVIRONMENT_DIR = 'swift_env'
|
||||||
|
|
@ -36,5 +35,6 @@ def run_hook(repo_cmd_runner, hook, file_args):
|
||||||
directory = repo_cmd_runner.path(helpers.environment_dir(
|
directory = repo_cmd_runner.path(helpers.environment_dir(
|
||||||
ENVIRONMENT_DIR, 'default',
|
ENVIRONMENT_DIR, 'default',
|
||||||
))
|
))
|
||||||
with(cwd(os.path.join(directory, BUILD_DIR, BUILD_CONFIG))):
|
cmd = helpers.to_cmd(hook)
|
||||||
return xargs(helpers.to_cmd(hook), file_args)
|
full_binary_path = os.path.join(directory, BUILD_DIR, BUILD_CONFIG, cmd[0])
|
||||||
|
return xargs((full_binary_path,) + cmd[1:], file_args)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue