Google Gemini-CLI Bug: Rollback Restores Empty Directory, Worsening Failed Updates
A bug discovered in Google's open-source terminal agent Gemini-CLI causes its extension update rollback mechanism to restore an empty directory instead of the previously installed extension. The flaw exists because the code never copies the current extension into a temporary directory before mutating it in place, meaning any failed update leaves the extension in a worse, partially-updated state. An existing automated test for this rollback path was passing despite the bug, because it only verified that the copy function was called with the correct arguments — not whether the source directory actually contained any files. The author proposes a fix involving backing up the extension before any mutation and using a boolean flag to prevent rollback from running unless a valid backup exists. A pull request addressing the issue, numbered 29166, was open at the time the article was written.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in