Skip to content

Commit 30fb05a

Browse files
committed
let cargo-binstall be optional
1 parent fb45e2f commit 30fb05a

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

noxfile.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import logging
2-
import platform
32
import re
43
import sys
54
import nox
@@ -36,22 +35,6 @@ def __init__(self, session: nox.Session):
3635
"Found %s: %s" % (CARGO_BINSTALL, cargo_bins[CARGO_BINSTALL])
3736
)
3837
self.cargo_install_cmd = ("cargo", "binstall", "-y")
39-
else:
40-
ci_logger.info("Installing %s" % CARGO_BINSTALL)
41-
match platform.system():
42-
case "Windows":
43-
one_liner = """Set-ExecutionPolicy Unrestricted -Scope Process; iex (iwr "https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.ps1").Content"""
44-
session.run(*one_liner.split(), external=True)
45-
case "Linux" | "Darwin":
46-
one_liner = "curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash"
47-
session.run(*one_liner.split(), external=True)
48-
case _:
49-
session.run(
50-
*self.cargo_install_cmd,
51-
CARGO_BINSTALL,
52-
"--locked",
53-
external=True,
54-
)
5538

5639
def check_install(self, req: str, session: nox.Session):
5740
"""Use cargo to ensure `req` is installed.

0 commit comments

Comments
 (0)