Get the current executable path
()
| 357 | |
| 358 | /// Get the current executable path |
| 359 | fn get_executable_path() -> Option<PathBuf> { |
| 360 | #[cfg(not(target_arch = "wasm32"))] |
| 361 | { |
| 362 | let exec_arg = env::args_os().next()?; |
| 363 | which::which(exec_arg).ok() |
| 364 | } |
| 365 | #[cfg(target_arch = "wasm32")] |
| 366 | { |
| 367 | let exec_arg = env::args().next()?; |
| 368 | Some(PathBuf::from(exec_arg)) |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | /// Parse pyvenv.cfg and extract the 'home' key value |
| 373 | fn parse_pyvenv_home(pyvenv_cfg: &Path) -> Option<String> { |
no test coverage detected