mirror of
https://github.com/grdl/git-get.git
synced 2026-02-12 23:25:15 +00:00
Add nil pointer check when accessing config provider
This commit is contained in:
@@ -48,7 +48,7 @@ func (c *Conf) ReposRoot() string {
|
|||||||
return reposRoot
|
return reposRoot
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.gitconfig == nil {
|
if c == nil || c.gitconfig == nil {
|
||||||
return defReposRoot
|
return defReposRoot
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ func (c *Conf) DefaultHost() string {
|
|||||||
return defaultHost
|
return defaultHost
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.gitconfig == nil {
|
if c == nil || c.gitconfig == nil {
|
||||||
return DefaultHost
|
return DefaultHost
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user