We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Can't use ruby 2.7.1 on MacOS
Hi, 

Bumping my ruby hooks to version 2.7.1 worked fine for me on Ubuntu but doesn't work for my colleagues using MacOS, is there something to do about bumping rbenv archives ? 

Thanks

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pre_commit/make_archives.py`
Content:
```
1 import argparse
2 import os.path
3 import tarfile
4 from typing import Optional
5 from typing import Sequence
6 
7 from pre_commit import output
8 from pre_commit.util import cmd_output_b
9 from pre_commit.util import rmtree
10 from pre_commit.util import tmpdir
11 
12 
13 # This is a script for generating the tarred resources for git repo
14 # dependencies.  Currently it's just for "vendoring" ruby support packages.
15 
16 
17 REPOS = (
18     ('rbenv', 'git://github.com/rbenv/rbenv', 'a3fa9b7'),
19     ('ruby-build', 'git://github.com/rbenv/ruby-build', '1a902f3'),
20     (
21         'ruby-download',
22         'git://github.com/garnieretienne/rvm-download',
23         '09bd7c6',
24     ),
25 )
26 
27 
28 def make_archive(name: str, repo: str, ref: str, destdir: str) -> str:
29     """Makes an archive of a repository in the given destdir.
30 
31     :param text name: Name to give the archive.  For instance foo.  The file
32     that is created will be called foo.tar.gz.
33     :param text repo: Repository to clone.
34     :param text ref: Tag/SHA/branch to check out.
35     :param text destdir: Directory to place archives in.
36     """
37     output_path = os.path.join(destdir, f'{name}.tar.gz')
38     with tmpdir() as tempdir:
39         # Clone the repository to the temporary directory
40         cmd_output_b('git', 'clone', repo, tempdir)
41         cmd_output_b('git', 'checkout', ref, cwd=tempdir)
42 
43         # We don't want the '.git' directory
44         # It adds a bunch of size to the archive and we don't use it at
45         # runtime
46         rmtree(os.path.join(tempdir, '.git'))
47 
48         with tarfile.open(output_path, 'w|gz') as tf:
49             tf.add(tempdir, name)
50 
51     return output_path
52 
53 
54 def main(argv: Optional[Sequence[str]] = None) -> int:
55     parser = argparse.ArgumentParser()
56     parser.add_argument('--dest', default='pre_commit/resources')
57     args = parser.parse_args(argv)
58     for archive_name, repo, ref in REPOS:
59         output.write_line(f'Making {archive_name}.tar.gz for {repo}@{ref}')
60         make_archive(archive_name, repo, ref, args.dest)
61     return 0
62 
63 
64 if __name__ == '__main__':
65     exit(main())
66
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/pre_commit/make_archives.py b/pre_commit/make_archives.py
--- a/pre_commit/make_archives.py
+++ b/pre_commit/make_archives.py
@@ -15,8 +15,8 @@
 
 
 REPOS = (
-    ('rbenv', 'git://github.com/rbenv/rbenv', 'a3fa9b7'),
-    ('ruby-build', 'git://github.com/rbenv/ruby-build', '1a902f3'),
+    ('rbenv', 'git://github.com/rbenv/rbenv', '0843745'),
+    ('ruby-build', 'git://github.com/rbenv/ruby-build', '258455e'),
     (
         'ruby-download',
         'git://github.com/garnieretienne/rvm-download',

{"golden_diff": "diff --git a/pre_commit/make_archives.py b/pre_commit/make_archives.py\n--- a/pre_commit/make_archives.py\n+++ b/pre_commit/make_archives.py\n@@ -15,8 +15,8 @@\n \n \n REPOS = (\n-    ('rbenv', 'git://github.com/rbenv/rbenv', 'a3fa9b7'),\n-    ('ruby-build', 'git://github.com/rbenv/ruby-build', '1a902f3'),\n+    ('rbenv', 'git://github.com/rbenv/rbenv', '0843745'),\n+    ('ruby-build', 'git://github.com/rbenv/ruby-build', '258455e'),\n     (\n         'ruby-download',\n         'git://github.com/garnieretienne/rvm-download',\n", "issue": "Can't use ruby 2.7.1 on MacOS\nHi, \r\n\r\nBumping my ruby hooks to version 2.7.1 worked fine for me on Ubuntu but doesn't work for my colleagues using MacOS, is there something to do about bumping rbenv archives ? \r\n\r\nThanks\n", "before_files": [{"content": "import argparse\nimport os.path\nimport tarfile\nfrom typing import Optional\nfrom typing import Sequence\n\nfrom pre_commit import output\nfrom pre_commit.util import cmd_output_b\nfrom pre_commit.util import rmtree\nfrom pre_commit.util import tmpdir\n\n\n# This is a script for generating the tarred resources for git repo\n# dependencies.  Currently it's just for \"vendoring\" ruby support packages.\n\n\nREPOS = (\n    ('rbenv', 'git://github.com/rbenv/rbenv', 'a3fa9b7'),\n    ('ruby-build', 'git://github.com/rbenv/ruby-build', '1a902f3'),\n    (\n        'ruby-download',\n        'git://github.com/garnieretienne/rvm-download',\n        '09bd7c6',\n    ),\n)\n\n\ndef make_archive(name: str, repo: str, ref: str, destdir: str) -> str:\n    \"\"\"Makes an archive of a repository in the given destdir.\n\n    :param text name: Name to give the archive.  For instance foo.  The file\n    that is created will be called foo.tar.gz.\n    :param text repo: Repository to clone.\n    :param text ref: Tag/SHA/branch to check out.\n    :param text destdir: Directory to place archives in.\n    \"\"\"\n    output_path = os.path.join(destdir, f'{name}.tar.gz')\n    with tmpdir() as tempdir:\n        # Clone the repository to the temporary directory\n        cmd_output_b('git', 'clone', repo, tempdir)\n        cmd_output_b('git', 'checkout', ref, cwd=tempdir)\n\n        # We don't want the '.git' directory\n        # It adds a bunch of size to the archive and we don't use it at\n        # runtime\n        rmtree(os.path.join(tempdir, '.git'))\n\n        with tarfile.open(output_path, 'w|gz') as tf:\n            tf.add(tempdir, name)\n\n    return output_path\n\n\ndef main(argv: Optional[Sequence[str]] = None) -> int:\n    parser = argparse.ArgumentParser()\n    parser.add_argument('--dest', default='pre_commit/resources')\n    args = parser.parse_args(argv)\n    for archive_name, repo, ref in REPOS:\n        output.write_line(f'Making {archive_name}.tar.gz for {repo}@{ref}')\n        make_archive(archive_name, repo, ref, args.dest)\n    return 0\n\n\nif __name__ == '__main__':\n    exit(main())\n", "path": "pre_commit/make_archives.py"}], "after_files": [{"content": "import argparse\nimport os.path\nimport tarfile\nfrom typing import Optional\nfrom typing import Sequence\n\nfrom pre_commit import output\nfrom pre_commit.util import cmd_output_b\nfrom pre_commit.util import rmtree\nfrom pre_commit.util import tmpdir\n\n\n# This is a script for generating the tarred resources for git repo\n# dependencies.  Currently it's just for \"vendoring\" ruby support packages.\n\n\nREPOS = (\n    ('rbenv', 'git://github.com/rbenv/rbenv', '0843745'),\n    ('ruby-build', 'git://github.com/rbenv/ruby-build', '258455e'),\n    (\n        'ruby-download',\n        'git://github.com/garnieretienne/rvm-download',\n        '09bd7c6',\n    ),\n)\n\n\ndef make_archive(name: str, repo: str, ref: str, destdir: str) -> str:\n    \"\"\"Makes an archive of a repository in the given destdir.\n\n    :param text name: Name to give the archive.  For instance foo.  The file\n    that is created will be called foo.tar.gz.\n    :param text repo: Repository to clone.\n    :param text ref: Tag/SHA/branch to check out.\n    :param text destdir: Directory to place archives in.\n    \"\"\"\n    output_path = os.path.join(destdir, f'{name}.tar.gz')\n    with tmpdir() as tempdir:\n        # Clone the repository to the temporary directory\n        cmd_output_b('git', 'clone', repo, tempdir)\n        cmd_output_b('git', 'checkout', ref, cwd=tempdir)\n\n        # We don't want the '.git' directory\n        # It adds a bunch of size to the archive and we don't use it at\n        # runtime\n        rmtree(os.path.join(tempdir, '.git'))\n\n        with tarfile.open(output_path, 'w|gz') as tf:\n            tf.add(tempdir, name)\n\n    return output_path\n\n\ndef main(argv: Optional[Sequence[str]] = None) -> int:\n    parser = argparse.ArgumentParser()\n    parser.add_argument('--dest', default='pre_commit/resources')\n    args = parser.parse_args(argv)\n    for archive_name, repo, ref in REPOS:\n        output.write_line(f'Making {archive_name}.tar.gz for {repo}@{ref}')\n        make_archive(archive_name, repo, ref, args.dest)\n    return 0\n\n\nif __name__ == '__main__':\n    exit(main())\n", "path": "pre_commit/make_archives.py"}]}