mirror of
https://github.com/grdl/git-get.git
synced 2026-02-04 16:14:48 +00:00
Fix problems with loading values from gitconfig
This commit is contained in:
@@ -9,7 +9,7 @@ type ConfigGlobal struct{}
|
||||
|
||||
// Get reads a value from global gitconfig file. Returns empty string when key is missing.
|
||||
func (c *ConfigGlobal) Get(key string) string {
|
||||
out, err := run.Git("config", "--global").AndCaptureLine()
|
||||
out, err := run.Git("config", "--global", key).AndCaptureLine()
|
||||
// In case of error return an empty string, the missing value will fall back to a default.
|
||||
if err != nil {
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user