From 28802689a136bfcdb721715abd713740beecbe07 Mon Sep 17 00:00:00 2001 From: Aiqiao Yan <55104035+aiqiaoy@users.noreply.github.com> Date: Fri, 17 Jul 2026 13:44:40 -0400 Subject: [PATCH] escape values passed to --unset (#2530) --- dist/index.js | 2 +- src/git-command-manager.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index b319687..06ae5d2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -35913,7 +35913,7 @@ class GitCommandManager { else { 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); return output.exitCode === 0; } diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index 36cdb47..8431658 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -510,7 +510,7 @@ class GitCommandManager { } else { args.push(globalConfig ? '--global' : '--local') } - args.push('--unset', configKey, configValue) + args.push('--unset', configKey, regexpHelper.escape(configValue)) const output = await this.execGit(args, true) return output.exitCode === 0