mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Simplify if statement slightly
This commit is contained in:
parent
47fb42cf1f
commit
8537e7c94e
1 changed files with 2 additions and 1 deletions
|
|
@ -24,15 +24,16 @@ def _envdir(prefix, version):
|
|||
|
||||
|
||||
def get_env_patch(venv): # pragma: windows no cover
|
||||
lib_dir = 'lib'
|
||||
if sys.platform == 'cygwin': # pragma: no cover
|
||||
_, win_venv, _ = cmd_output('cygpath', '-w', venv)
|
||||
install_prefix = r'{}\bin'.format(win_venv.strip())
|
||||
lib_dir = 'lib'
|
||||
elif sys.platform == 'win32': # pragma: no cover
|
||||
install_prefix = bin_dir(venv)
|
||||
lib_dir = 'Scripts'
|
||||
else: # pragma: windows no cover
|
||||
install_prefix = venv
|
||||
lib_dir = 'lib'
|
||||
return (
|
||||
('NODE_VIRTUAL_ENV', venv),
|
||||
('NPM_CONFIG_PREFIX', install_prefix),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue