(command *Command, args []string)
| 38 | } |
| 39 | |
| 40 | func runShell(command *Command, args []string) bool { |
| 41 | |
| 42 | util.LoadSecurityConfiguration() |
| 43 | shellOptions.GrpcDialOption = security.LoadClientTLS(util.GetViper(), "grpc.client") |
| 44 | shellOptions.Directory = "/" |
| 45 | |
| 46 | util.LoadConfiguration("shell", false) |
| 47 | viper := util.GetViper() |
| 48 | cluster := viper.GetString("cluster.default") |
| 49 | if *shellCluster != "" { |
| 50 | cluster = *shellCluster |
| 51 | } |
| 52 | |
| 53 | if *shellOptions.Masters == "" { |
| 54 | if cluster == "" { |
| 55 | *shellOptions.Masters = "localhost:9333" |
| 56 | } else { |
| 57 | *shellOptions.Masters = viper.GetString("cluster." + cluster + ".master") |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | filerAddress := *shellInitialFiler |
| 62 | if filerAddress == "" && cluster != "" { |
| 63 | filerAddress = viper.GetString("cluster." + cluster + ".filer") |
| 64 | } |
| 65 | shellOptions.FilerAddress = pb.ServerAddress(filerAddress) |
| 66 | shellOptions.Debug = *shellDebug |
| 67 | if shellOptions.Debug { |
| 68 | fmt.Fprintf(os.Stderr, "master: %s filer: %s\n", *shellOptions.Masters, shellOptions.FilerAddress) |
| 69 | } |
| 70 | |
| 71 | shell.RunShell(shellOptions) |
| 72 | |
| 73 | return true |
| 74 | |
| 75 | } |
nothing calls this directly
no test coverage detected