MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / package_managed_tls_dirs

Function package_managed_tls_dirs

crates/openshell-cli/src/run.rs:724–744  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

722}
723
724fn package_managed_tls_dirs() -> Vec<PathBuf> {
725 if let Some(path) = std::env::var_os("OPENSHELL_LOCAL_TLS_DIR") {
726 return vec![PathBuf::from(path)];
727 }
728
729 let mut dirs = Vec::new();
730
731 if cfg!(target_os = "macos") {
732 dirs.push(PathBuf::from("/opt/homebrew/var/openshell/tls"));
733 dirs.push(PathBuf::from("/usr/local/var/openshell/tls"));
734 }
735
736 let state_dir = std::env::var_os("XDG_STATE_HOME")
737 .map(PathBuf::from)
738 .or_else(|| std::env::var_os("HOME").map(|home| PathBuf::from(home).join(".local/state")));
739 if let Some(state_dir) = state_dir {
740 dirs.push(state_dir.join("openshell/tls"));
741 }
742
743 dirs
744}
745
746fn import_local_package_mtls_bundle(name: &str) -> Result<Option<PathBuf>> {
747 for dir in package_managed_tls_dirs() {

Callers 1

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected