Преглед изворни кода

escape values passed to --unset (#2530)

Aiqiao Yan пре 1 месец
родитељ
комит
28802689a1
2 измењених фајлова са 2 додато и 2 уклоњено
  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