MCPcopy Create free account
hub / github.com/bootc-dev/bootc / skopeo_bin

Function skopeo_bin

crates/utils/src/lib.rs:42–47  ·  view source on GitHub ↗

Return the skopeo binary path, honouring the `BOOTC_EXP_EXTERNAL_CONTAINER_TOOL` environment variable so callers can substitute an alternative tool (e.g. `dtool`) without hard-linking it as `/usr/bin/skopeo`. The _EXP prefix indicates this interface is experimental and subject to change.

()

Source from the content-addressed store, hash-verified

40/// without hard-linking it as `/usr/bin/skopeo`. The _EXP prefix indicates this
41/// interface is experimental and subject to change.
42pub fn skopeo_bin() -> &'static str {
43 static BIN: std::sync::OnceLock<String> = std::sync::OnceLock::new();
44 BIN.get_or_init(|| {
45 std::env::var("BOOTC_EXP_EXTERNAL_CONTAINER_TOOL").unwrap_or_else(|_| "skopeo".to_string())
46 })
47}
48
49/// Intended for use in `main`, calls an inner function and
50/// handles errors by printing them.

Callers 4

run_from_optFunction · 0.85
prepare_for_pull_unifiedFunction · 0.85
new_cmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected