mirror of
https://github.com/grdl/git-get.git
synced 2026-02-04 23:14:43 +00:00
Fix problems with loading values from gitconfig
This commit is contained in:
@@ -36,16 +36,18 @@ func init() {
|
||||
viper.BindPFlag(cfg.KeyDefaultHost, cmd.PersistentFlags().Lookup(cfg.KeyDefaultHost))
|
||||
viper.BindPFlag(cfg.KeyDump, cmd.PersistentFlags().Lookup(cfg.KeyDump))
|
||||
viper.BindPFlag(cfg.KeyReposRoot, cmd.PersistentFlags().Lookup(cfg.KeyReposRoot))
|
||||
|
||||
cfg.Init(&git.ConfigGlobal{})
|
||||
}
|
||||
|
||||
func run(cmd *cobra.Command, args []string) error {
|
||||
cfg.Init(&git.ConfigGlobal{})
|
||||
|
||||
var url string
|
||||
if len(args) > 0 {
|
||||
url = args[0]
|
||||
}
|
||||
|
||||
cfg.Expand(cfg.KeyReposRoot)
|
||||
|
||||
config := &pkg.GetCfg{
|
||||
Branch: viper.GetString(cfg.KeyBranch),
|
||||
DefHost: viper.GetString(cfg.KeyDefaultHost),
|
||||
|
||||
Reference in New Issue
Block a user