From f676c90d870a297273a5ba6f3c49cecf8d87559c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 15:19:48 +0200 Subject: Adding upstream version 3.7.1. Signed-off-by: Daniel Baumann --- pre_commit/languages/rust.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pre_commit/languages') 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 -- cgit v1.2.3