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

Function make_executable

pre_commit/util.py:43–46  ·  view source on GitHub ↗
(filename: str)

Source from the content-addressed store, hash-verified

41
42
43def make_executable(filename: str) -> None:
44 original_mode = os.stat(filename).st_mode
45 new_mode = original_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
46 os.chmod(filename, new_mode)
47
48
49class CalledProcessError(RuntimeError):

Callers 15

_install_hook_scriptFunction · 0.90
test_simple_caseFunction · 0.90
write_executableFunction · 0.90
prepare_commit_msg_repoFunction · 0.90
test_luaFunction · 0.90
test_perl_installFunction · 0.90

Calls

no outgoing calls

Tested by 15

test_simple_caseFunction · 0.72
write_executableFunction · 0.72
prepare_commit_msg_repoFunction · 0.72
test_luaFunction · 0.72
test_perl_installFunction · 0.72
_write_legacy_hookFunction · 0.72