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

Function _install_rbenv

pre_commit/languages/ruby.py:88–101  ·  view source on GitHub ↗
(
        prefix: Prefix,
        version: str,
)

Source from the content-addressed store, hash-verified

86
87
88def _install_rbenv(
89 prefix: Prefix,
90 version: str,
91) -> None: # pragma: win32 no cover
92 envdir = lang_base.environment_dir(prefix, ENVIRONMENT_DIR, version)
93
94 _extract_resource('rbenv.tar.gz', prefix.path('.'))
95 shutil.move(prefix.path('rbenv'), envdir)
96
97 # Only install ruby-build if the version is specified
98 if version != C.DEFAULT:
99 plugins_dir = os.path.join(envdir, 'plugins')
100 _extract_resource('ruby-download.tar.gz', plugins_dir)
101 _extract_resource('ruby-build.tar.gz', plugins_dir)
102
103
104def _install_ruby(

Callers 1

install_environmentFunction · 0.85

Calls 2

_extract_resourceFunction · 0.85
pathMethod · 0.80

Tested by

no test coverage detected