mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 00:24:47 +04:00
Remove plumbum
This commit is contained in:
parent
5d9ba14841
commit
bbd2572b11
24 changed files with 236 additions and 203 deletions
|
|
@ -6,10 +6,11 @@ import os
|
|||
import os.path
|
||||
import tempfile
|
||||
from cached_property import cached_property
|
||||
from plumbum import local
|
||||
|
||||
from pre_commit.prefixed_command_runner import PrefixedCommandRunner
|
||||
from pre_commit.util import clean_path_on_failure
|
||||
from pre_commit.util import cmd_output
|
||||
from pre_commit.util import cwd
|
||||
from pre_commit.util import hex_md5
|
||||
|
||||
|
||||
|
|
@ -85,9 +86,9 @@ class Store(object):
|
|||
|
||||
dir = tempfile.mkdtemp(prefix='repo', dir=self.directory)
|
||||
with clean_path_on_failure(dir):
|
||||
local['git']('clone', '--no-checkout', url, dir)
|
||||
with local.cwd(dir):
|
||||
local['git']('checkout', sha)
|
||||
cmd_output('git', 'clone', '--no-checkout', url, dir)
|
||||
with cwd(dir):
|
||||
cmd_output('git', 'checkout', sha)
|
||||
|
||||
# Make a symlink from sha->repo
|
||||
os.symlink(dir, sha_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue