Bläddra i källkod

escape values passed to --unset (#2530)

Aiqiao Yan 1 månad sedan
förälder
incheckning
28802689a1
2 ändrade filer med 2 tillägg och 2 borttagningar
  1. 1 1
      dist/index.js
  2. 1 1
      src/git-command-manager.ts

+ 1 - 1
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;
     }

+ 1 - 1
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