Skip to content

Commit 2880268

Browse files
authored
escape values passed to --unset (#2530)
1 parent 12cd223 commit 2880268

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35913,7 +35913,7 @@ class GitCommandManager {
3591335913
else {
3591435914
args.push(globalConfig ? '--global' : '--local');
3591535915
}
35916-
args.push('--unset', configKey, configValue);
35916+
args.push('--unset', configKey, regexp_helper_escape(configValue));
3591735917
const output = await this.execGit(args, true);
3591835918
return output.exitCode === 0;
3591935919
}

src/git-command-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ class GitCommandManager {
510510
} else {
511511
args.push(globalConfig ? '--global' : '--local')
512512
}
513-
args.push('--unset', configKey, configValue)
513+
args.push('--unset', configKey, regexpHelper.escape(configValue))
514514

515515
const output = await this.execGit(args, true)
516516
return output.exitCode === 0

0 commit comments

Comments
 (0)