Преглед на файлове

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