image_optimizer/updater/executable_manager.rs
1use anyhow::Result;
2use std::path::PathBuf;
3
4/// Gets the path to the current executable
5///
6/// # Errors
7/// Returns an error if the current executable path cannot be determined
8pub fn get_current_executable() -> Result<PathBuf> {
9 std::env::current_exe()
10 .map_err(|e| anyhow::anyhow!("Failed to get current executable path: {}", e))
11}