fix: replace config flag use_external_git to option git_client

This commit is contained in:
Denis Gukov 2023-04-25 20:04:03 +02:00
parent 3e4a62b7f2
commit 81dd70ae1f
2 changed files with 7 additions and 5 deletions

View File

@ -3,11 +3,12 @@ package lib
import "github.com/ansible-semaphore/semaphore/util"
func CreateDefaultGitClient() GitClient {
if util.Config.UseExternalGit {
switch util.Config.GitClient {
case "go_git":
return CreateGoGitClient()
default:
return CreateCmdGitClient()
}
return CreateGoGitClient()
}
func CreateGoGitClient() GitClient {

View File

@ -117,8 +117,9 @@ type ConfigType struct {
SshConfigPath string `json:"ssh_config_path"`
DemoMode bool `json:"demo_mode"`
UseExternalGit bool `json:"use_external_git"`
DemoMode bool `json:"demo_mode"`
GitClient string `json:"git_client"`
}
// Config exposes the application configuration storage for use in the application