escape values passed to --unset (#2530)

This commit is contained in:
Aiqiao Yan 2026-07-17 13:44:40 -04:00 committed by GitHub
parent 12cd2235ef
commit 28802689a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

2
dist/index.js vendored
View file

@ -35913,7 +35913,7 @@ class GitCommandManager {
else { else {
args.push(globalConfig ? '--global' : '--local'); args.push(globalConfig ? '--global' : '--local');
} }
args.push('--unset', configKey, configValue); args.push('--unset', configKey, regexp_helper_escape(configValue));
const output = await this.execGit(args, true); const output = await this.execGit(args, true);
return output.exitCode === 0; return output.exitCode === 0;
} }

View file

@ -510,7 +510,7 @@ class GitCommandManager {
} else { } else {
args.push(globalConfig ? '--global' : '--local') args.push(globalConfig ? '--global' : '--local')
} }
args.push('--unset', configKey, configValue) args.push('--unset', configKey, regexpHelper.escape(configValue))
const output = await this.execGit(args, true) const output = await this.execGit(args, true)
return output.exitCode === 0 return output.exitCode === 0