File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 4545 # run: vcpkg install openssl
4646
4747 - uses : cargo-bins/cargo-binstall@main
48- env :
49- CARGO_HOME : ' ~/.cargo'
5048
5149 - name : Install third-party binaries (HTML report generator)
5250 run : >-
Original file line number Diff line number Diff line change 11import logging
2+ from os import environ
23from pathlib import Path
34import platform
45import re
1516
1617BIN_STALL_CARGO = re .compile (r"^([^\s]+)\s([^:]+):" )
1718CARGO_BINSTALL = "cargo-binstall"
19+ IS_CI = "CI" in environ
1820
1921
2022class CargoInstaller :
@@ -30,8 +32,9 @@ def __init__(self, session: nox.Session):
3032 name , version = found .groups ()
3133 cargo_bins .setdefault (name , version )
3234 self .cargo_bins = cargo_bins
33- for dep , ver in cargo_bins .items ():
34- ci_logger .info ("Found %s: %s" % (dep , ver ))
35+ if IS_CI :
36+ for dep , ver in cargo_bins .items ():
37+ ci_logger .info ("Found %s: %s" % (dep , ver ))
3538 self .cargo_install_cmd : tuple [str , ...] = ("cargo" , "install" )
3639
3740 installed_path = Path ("~/.cargo/bin" )
@@ -45,7 +48,7 @@ def __init__(self, session: nox.Session):
4548 / (CARGO_BINSTALL + "" if platform .system () != "Windows" else ".exe" )
4649 ).exists ():
4750 ci_logger .info ("Found %s" % CARGO_BINSTALL )
48- else :
51+ elif not IS_CI :
4952 ci_logger .info ("Installing %s" % CARGO_BINSTALL )
5053 match platform .system ():
5154 case "Windows" :
You can’t perform that action at this time.
0 commit comments