(name: string)
| 100 | * 删除一个 auth profile |
| 101 | */ |
| 102 | export function deleteAuthProfile(name: string): boolean { |
| 103 | const data = loadAuthProfiles() |
| 104 | if (!(name in data.profiles)) return false |
| 105 | |
| 106 | delete data.profiles[name] |
| 107 | const filePath = getAuthProfilesPath() |
| 108 | fs.writeFileSync(filePath, JSON.stringify(data, null, 2), { encoding: 'utf-8', mode: 0o600 }) |
| 109 | return true |
| 110 | } |
no test coverage detected