()
| 257 | } |
| 258 | |
| 259 | pub fn global_root() -> PathBuf { |
| 260 | let lock = GLOBAL_ROOT.get_or_init(Default::default).lock().unwrap(); |
| 261 | match lock.as_ref() { |
| 262 | Some(p) => p.clone(), |
| 263 | None => unreachable!("GLOBAL_ROOT not set yet"), |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | fn global_root_legacy() -> PathBuf { |
| 268 | let mut path = std::env::current_exe().expect(""); |