Skip to main content

remove_credential

Function remove_credential 

Source
pub fn remove_credential(cred: &CredentialRef) -> Result<bool, String>
Expand description

Remove one account slot. Returns true if a key was removed. Never leaves a partial file and never touches any other key. A corrupt file is an error (nothing is reset on a removal path).

Profiles: listings and loads read through auth_file_path, which falls back to the base auth.json when the active profile has none. Removal refuses to act on such an inherited file rather than silently “succeeding” against an empty profile file or deleting from the base store on the profile’s behalf.