summaryrefslogtreecommitdiffstats
path: root/pre_commit/languages/rust.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 05:33:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 05:33:24 +0000
commitb0bcd1c3ad465da1d50bc47dd6afc8a77c21a85e (patch)
treeda8add9478f5d2ce59a5179e85f6b4c15c395964 /pre_commit/languages/rust.py
parentReleasing debian version 3.7.0-1. (diff)
downloadpre-commit-b0bcd1c3ad465da1d50bc47dd6afc8a77c21a85e.tar.xz
pre-commit-b0bcd1c3ad465da1d50bc47dd6afc8a77c21a85e.zip
Merging upstream version 3.7.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/languages/rust.py')
-rw-r--r--pre_commit/languages/rust.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pre_commit/languages/rust.py b/pre_commit/languages/rust.py
index 7b04d6c..5f9db8f 100644
--- a/pre_commit/languages/rust.py
+++ b/pre_commit/languages/rust.py
@@ -34,7 +34,7 @@ def get_default_version() -> str:
# Just detecting the executable does not suffice, because if rustup is
# installed but no toolchain is available, then `cargo` exists but
# cannot be used without installing a toolchain first.
- if cmd_output_b('cargo', '--version', check=False)[0] == 0:
+ if cmd_output_b('cargo', '--version', check=False, cwd='/')[0] == 0:
return 'system'
else:
return C.DEFAULT