fix(patch): cherry-pick 42eedc9 to release/v0.27.0-preview.2-pr-17826 to patch version v0.27.0-preview.2 and create version 0.27.0-preview.3 (#17907)

Co-authored-by: christine betts <chrstn@uw.edu>
This commit is contained in:
gemini-cli-robot
2026-01-29 14:10:22 -08:00
committed by GitHub
parent 9cf06a3e00
commit 09800ea74e
2 changed files with 76 additions and 2 deletions
@@ -112,7 +112,7 @@ export async function maybePromptForSettings(
const nonSensitiveSettings: Record<string, string> = {};
for (const setting of settings) {
const value = allSettings[setting.envVar];
if (value === undefined) {
if (value === undefined || value === '') {
continue;
}
if (setting.sensitive) {
@@ -230,7 +230,15 @@ export async function updateSetting(
);
if (settingToUpdate.sensitive) {
await keychain.setSecret(settingToUpdate.envVar, newValue);
if (newValue) {
await keychain.setSecret(settingToUpdate.envVar, newValue);
} else {
try {
await keychain.deleteSecret(settingToUpdate.envVar);
} catch {
// Ignore if secret does not exist
}
}
return;
}