fixing bug with config generation, started fixing add command, next commit command

This commit is contained in:
2020-07-04 22:05:02 -04:00
parent 5af55ed62e
commit c07e09d155
10 changed files with 256 additions and 44 deletions

View File

@@ -168,12 +168,10 @@ func initCommand(cli *clir.Cli, conf *clientconfig.Gvcconfig, dbPath string) {
if err != nil {
log.Fatalf("unable to create new repo: %s", err)
}
newConf := clientconfig.Gvcconfig{
RepoName: repoName,
Version: version,
CurrentBranch: "master",
}
err = store.Save(configPath, &newConf)
conf.RepoName = repoName
conf.Version = version
conf.CurrentBranch = "master"
fmt.Println("Branch is now set to: ", conf.CurrentBranch)
if err != nil {
log.Fatalf("unable to create new config in .gvc %s", err)
}