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 45
45
# run: vcpkg install openssl
46
46
47
47
- uses : cargo-bins/cargo-binstall@main
48
- env :
49
- CARGO_HOME : ' ~/.cargo'
50
48
51
49
- name : Install third-party binaries (HTML report generator)
52
50
run : >-
Original file line number Diff line number Diff line change 1
1
import logging
2
+ from os import environ
2
3
from pathlib import Path
3
4
import platform
4
5
import re
15
16
16
17
BIN_STALL_CARGO = re .compile (r"^([^\s]+)\s([^:]+):" )
17
18
CARGO_BINSTALL = "cargo-binstall"
19
+ IS_CI = "CI" in environ
18
20
19
21
20
22
class CargoInstaller :
@@ -30,8 +32,9 @@ def __init__(self, session: nox.Session):
30
32
name , version = found .groups ()
31
33
cargo_bins .setdefault (name , version )
32
34
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 ))
35
38
self .cargo_install_cmd : tuple [str , ...] = ("cargo" , "install" )
36
39
37
40
installed_path = Path ("~/.cargo/bin" )
@@ -45,7 +48,7 @@ def __init__(self, session: nox.Session):
45
48
/ (CARGO_BINSTALL + "" if platform .system () != "Windows" else ".exe" )
46
49
).exists ():
47
50
ci_logger .info ("Found %s" % CARGO_BINSTALL )
48
- else :
51
+ elif not IS_CI :
49
52
ci_logger .info ("Installing %s" % CARGO_BINSTALL )
50
53
match platform .system ():
51
54
case "Windows" :
You can’t perform that action at this time.
0 commit comments