From 0fc042ca35b9ee6d4c6dc650662d40f189018a49 Mon Sep 17 00:00:00 2001 From: eric sciple Date: Mon, 1 Nov 2021 11:43:18 -0500 Subject: set insteadOf url for org-id (#621) --- src/git-command-manager.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/git-command-manager.ts') diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index 409a161..699a963 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -21,7 +21,8 @@ export interface IGitCommandManager { config( configKey: string, configValue: string, - globalConfig?: boolean + globalConfig?: boolean, + add?: boolean ): Promise configExists(configKey: string, globalConfig?: boolean): Promise fetch(refSpec: string[], fetchDepth?: number): Promise @@ -140,14 +141,15 @@ class GitCommandManager { async config( configKey: string, configValue: string, - globalConfig?: boolean + globalConfig?: boolean, + add?: boolean ): Promise { - await this.execGit([ - 'config', - globalConfig ? '--global' : '--local', - configKey, - configValue - ]) + const args: string[] = ['config', globalConfig ? '--global' : '--local'] + if (add) { + args.push('--add') + } + args.push(...[configKey, configValue]) + await this.execGit(args) } async configExists( -- cgit v1.2.3