mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
shlex.join is always available in 3.8+
This commit is contained in:
parent
3126802bf4
commit
1c439b5a79
1 changed files with 1 additions and 2 deletions
|
|
@ -103,8 +103,7 @@ def _install_hook_script(
|
||||||
|
|
||||||
hook_file.write(before + TEMPLATE_START)
|
hook_file.write(before + TEMPLATE_START)
|
||||||
hook_file.write(f'INSTALL_PYTHON={shlex.quote(sys.executable)}\n')
|
hook_file.write(f'INSTALL_PYTHON={shlex.quote(sys.executable)}\n')
|
||||||
# TODO: python3.8+: shlex.join
|
args_s = shlex.join(args)
|
||||||
args_s = ' '.join(shlex.quote(part) for part in args)
|
|
||||||
hook_file.write(f'ARGS=({args_s})\n')
|
hook_file.write(f'ARGS=({args_s})\n')
|
||||||
hook_file.write(TEMPLATE_END + after)
|
hook_file.write(TEMPLATE_END + after)
|
||||||
make_executable(hook_path)
|
make_executable(hook_path)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue