MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / get_env_patch

Function get_env_patch

pre_commit/languages/lua.py:28–43  ·  view source on GitHub ↗
(d: str)

Source from the content-addressed store, hash-verified

26
27
28def get_env_patch(d: str) -> PatchesT: # pragma: win32 no cover
29 version = _get_lua_version()
30 so_ext = 'dll' if sys.platform == 'win32' else 'so'
31 return (
32 ('PATH', (os.path.join(d, 'bin'), os.pathsep, Var('PATH'))),
33 (
34 'LUA_PATH', (
35 os.path.join(d, 'share', 'lua', version, '?.lua;'),
36 os.path.join(d, 'share', 'lua', version, '?', 'init.lua;;'),
37 ),
38 ),
39 (
40 'LUA_CPATH',
41 (os.path.join(d, 'lib', 'lua', version, f'?.{so_ext};;'),),
42 ),
43 )
44
45
46@contextlib.contextmanager # pragma: win32 no cover

Callers 1

in_envFunction · 0.70

Calls 2

VarClass · 0.90
_get_lua_versionFunction · 0.85

Tested by

no test coverage detected