improving client/server info command

This commit is contained in:
2020-06-07 18:31:01 -04:00
parent dd3fd7c4ae
commit 6d738b138d
12 changed files with 72 additions and 31 deletions

View File

@@ -113,8 +113,9 @@ func initCommand(cli *clir.Cli, conf *clientconfig.Gvcconfig) {
initCmd.Action(func() error {
isRepo := validateRepo()
if !isRepo {
clientcmd.InitializeRepo() // creates and checks the paths
repoName := clientcmd.InitializeRepo() // creates and checks the paths
newConf := clientconfig.Gvcconfig{
RepoName: repoName,
Version: version,
CurrentBranch: "master",
}
@@ -327,11 +328,11 @@ func infoCommands(cli *clir.Cli, conf *clientconfig.Gvcconfig) {
return fmt.Errorf("Please supply a server name to test a remote")
}
server := remoteInfoCmd.OtherArgs()[0]
err := clientcmd.PingServer(server, "master", conf)
connectionString, err := clientcmd.FindServer(server, "master", conf)
if err != nil {
return err
}
err = clientcmd.GetServerInfo()
err = clientcmd.GetServerInfo(connectionString, conf.RepoName)
if err != nil {
return err
}