Skip to main content

write_profile

Function write_profile 

Source
pub fn write_profile(
    path: &Path,
    profile_name: &str,
    account_id: &str,
    client_id: &str,
    client_secret: &str,
) -> Result<(), ApiError>
Expand description

Write (or overwrite) a single profile in the config file, preserving other profiles.

Creates the config directory and file if they don’t exist, then sets permissions to 0600 on unix.