Skip to content

Conversation

@vivienhenz24
Copy link

Found a data‑loss bug in set_credentials() where it opens config.toml in "w" mode and writes only the current profile, which truncates the file and deletes all other profiles. That means if you already have [default] and [profile1], calling set_credentials("new-key", "profile2") leaves you with only [profile2] and no warning.

I switched it to read the existing TOML, update/add the requested profile in memory, and write the whole thing back so nothing else is lost, and adjusted the test to match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant