fix: use --fixed-value flag when unsetting git config values

The tryConfigUnsetValue method was passing file paths directly to
`git config --unset`, which treats the value argument as an extended
regular expression. File paths contain `.` characters that would match
any character instead of literal periods, potentially causing incorrect
matches.

Adding the --fixed-value flag ensures the value is treated as a literal
string, fixing credential config cleanup in the v6-style authentication.
This commit is contained in:
Peter Evans 2026-01-21 17:59:11 +00:00
parent 2df30281e1
commit 64240115db
2 changed files with 4 additions and 2 deletions

View file

@ -368,7 +368,7 @@ export class GitCommandManager {
} else {
args.push(globalConfig ? '--global' : '--local')
}
args.push('--unset', configKey, configValue)
args.push('--fixed-value', '--unset', configKey, configValue)
const output = await this.exec(args, {allowAllExitCodes: true})
return output.exitCode === 0
}