Merging upstream version 3.2.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
2a3580e7b5
commit
eff7bbc5c9
3 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
3.2.1 - 2023-03-25
|
||||||
|
==================
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- Fix `language_version` for `language: rust` without global `rustup`.
|
||||||
|
- #2823 issue by @daschuer.
|
||||||
|
- #2827 PR by @asottile.
|
||||||
|
|
||||||
3.2.0 - 2023-03-17
|
3.2.0 - 2023-03-17
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
|
|
@ -80,9 +80,9 @@ def _add_dependencies(
|
||||||
lang_base.setup_cmd(prefix, ('cargo', 'add', *crates))
|
lang_base.setup_cmd(prefix, ('cargo', 'add', *crates))
|
||||||
|
|
||||||
|
|
||||||
def install_rust_with_toolchain(toolchain: str) -> None:
|
def install_rust_with_toolchain(toolchain: str, envdir: str) -> None:
|
||||||
with tempfile.TemporaryDirectory() as rustup_dir:
|
with tempfile.TemporaryDirectory() as rustup_dir:
|
||||||
with envcontext((('RUSTUP_HOME', rustup_dir),)):
|
with envcontext((('CARGO_HOME', envdir), ('RUSTUP_HOME', rustup_dir))):
|
||||||
# acquire `rustup` if not present
|
# acquire `rustup` if not present
|
||||||
if parse_shebang.find_executable('rustup') is None:
|
if parse_shebang.find_executable('rustup') is None:
|
||||||
# We did not detect rustup and need to download it first.
|
# We did not detect rustup and need to download it first.
|
||||||
|
@ -145,7 +145,7 @@ def install_environment(
|
||||||
ctx.enter_context(in_env(prefix, version))
|
ctx.enter_context(in_env(prefix, version))
|
||||||
|
|
||||||
if version != 'system':
|
if version != 'system':
|
||||||
install_rust_with_toolchain(_rust_toolchain(version))
|
install_rust_with_toolchain(_rust_toolchain(version), envdir)
|
||||||
|
|
||||||
tmpdir = ctx.enter_context(tempfile.TemporaryDirectory())
|
tmpdir = ctx.enter_context(tempfile.TemporaryDirectory())
|
||||||
ctx.enter_context(envcontext((('RUSTUP_HOME', tmpdir),)))
|
ctx.enter_context(envcontext((('RUSTUP_HOME', tmpdir),)))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[metadata]
|
[metadata]
|
||||||
name = pre_commit
|
name = pre_commit
|
||||||
version = 3.2.0
|
version = 3.2.1
|
||||||
description = A framework for managing and maintaining multi-language pre-commit hooks.
|
description = A framework for managing and maintaining multi-language pre-commit hooks.
|
||||||
long_description = file: README.md
|
long_description = file: README.md
|
||||||
long_description_content_type = text/markdown
|
long_description_content_type = text/markdown
|
||||||
|
|
Loading…
Add table
Reference in a new issue