mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Split out cmd_output_b
This commit is contained in:
parent
ab063977ad
commit
f612aeb22b
20 changed files with 79 additions and 70 deletions
|
|
@ -7,7 +7,7 @@ import os.path
|
|||
import tarfile
|
||||
|
||||
from pre_commit import output
|
||||
from pre_commit.util import cmd_output
|
||||
from pre_commit.util import cmd_output_b
|
||||
from pre_commit.util import rmtree
|
||||
from pre_commit.util import tmpdir
|
||||
|
||||
|
|
@ -39,8 +39,8 @@ def make_archive(name, repo, ref, destdir):
|
|||
output_path = os.path.join(destdir, name + '.tar.gz')
|
||||
with tmpdir() as tempdir:
|
||||
# Clone the repository to the temporary directory
|
||||
cmd_output('git', 'clone', repo, tempdir)
|
||||
cmd_output('git', 'checkout', ref, cwd=tempdir)
|
||||
cmd_output_b('git', 'clone', repo, tempdir)
|
||||
cmd_output_b('git', 'checkout', ref, cwd=tempdir)
|
||||
|
||||
# We don't want the '.git' directory
|
||||
# It adds a bunch of size to the archive and we don't use it at
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue