Skip to main content

delete_profile

Function delete_profile 

Source
pub fn delete_profile(path: &Path, profile_name: &str) -> Result<(), ApiError>
Expand description

Remove a named profile from the config file, preserving comments and formatting in the remaining sections.

Returns Ok(()) if removed, Err(ApiError::NotFound) if the profile doesn’t exist, and Err(ApiError::Other(...)) for IO/parse failures.