adding more server/client communication commands, need to fix echo path params
This commit is contained in:
@@ -323,11 +323,18 @@ func infoCommands(cli *clir.Cli, conf *clientconfig.Gvcconfig) {
|
||||
fmt.Println("no valid repo found.. please run 'init' to setup a repo first")
|
||||
os.Exit(0)
|
||||
}
|
||||
if len(remoteInfoCmd.OtherArgs()) == 0 {
|
||||
remoteInfoCmd.PrintHelp()
|
||||
return fmt.Errorf("Please supply a server name to test a remote")
|
||||
var server string
|
||||
if len(remoteInfoCmd.OtherArgs()) == 0 { //Notify that we are using default server if none specified
|
||||
fmt.Println("No server specified, using default...")
|
||||
for _, remote := range conf.Remotes {
|
||||
if remote.Default {
|
||||
server = remote.Name
|
||||
}
|
||||
}
|
||||
} else { // Server name was specified, using that server
|
||||
server = remoteInfoCmd.OtherArgs()[0]
|
||||
}
|
||||
server := remoteInfoCmd.OtherArgs()[0]
|
||||
|
||||
connectionString, err := clientcmd.FindServer(server, "master", conf)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user