mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-20 01:24:42 +04:00
fix rust platform detection on windows
This commit is contained in:
parent
5becd50974
commit
6c524f7a55
1 changed files with 1 additions and 5 deletions
|
|
@ -3,7 +3,6 @@ from __future__ import annotations
|
||||||
import contextlib
|
import contextlib
|
||||||
import functools
|
import functools
|
||||||
import os.path
|
import os.path
|
||||||
import platform
|
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
@ -99,10 +98,7 @@ def install_rust_with_toolchain(toolchain: str) -> None:
|
||||||
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.
|
||||||
if sys.platform == 'win32': # pragma: win32 cover
|
if sys.platform == 'win32': # pragma: win32 cover
|
||||||
if platform.machine() == 'x86_64':
|
|
||||||
url = 'https://win.rustup.rs/x86_64'
|
url = 'https://win.rustup.rs/x86_64'
|
||||||
else:
|
|
||||||
url = 'https://win.rustup.rs/i686'
|
|
||||||
else: # pragma: win32 no cover
|
else: # pragma: win32 no cover
|
||||||
url = 'https://sh.rustup.rs'
|
url = 'https://sh.rustup.rs'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue