improve runtime connect error messages

This commit is contained in:
Willy Kloucek
2022-04-07 10:38:22 +02:00
parent 6317df4705
commit 131deab2cf
3 changed files with 3 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ func KillCommand(cfg *config.Config) *cli.Command {
Action: func(c *cli.Context) error {
client, err := rpc.DialHTTP("tcp", net.JoinHostPort(cfg.Runtime.Host, cfg.Runtime.Port))
if err != nil {
log.Fatal("dialing:", err)
log.Fatalf("Failed to connect to the runtime. Is the runtime running and did you configure the right runtime address (\"%s\")", cfg.Runtime.Host+":"+cfg.Runtime.Port)
}
var arg1 int

View File

@@ -34,7 +34,7 @@ func ListCommand(cfg *config.Config) *cli.Command {
Action: func(c *cli.Context) error {
client, err := rpc.DialHTTP("tcp", net.JoinHostPort(cfg.Runtime.Host, cfg.Runtime.Port))
if err != nil {
log.Fatal("dialing:", err)
log.Fatalf("Failed to connect to the runtime. Is the runtime running and did you configure the right runtime address (\"%s\")", cfg.Runtime.Host+":"+cfg.Runtime.Port)
}
var arg1 string

View File

@@ -36,7 +36,7 @@ func RunCommand(cfg *config.Config) *cli.Command {
Action: func(c *cli.Context) error {
client, err := rpc.DialHTTP("tcp", net.JoinHostPort(cfg.Runtime.Host, cfg.Runtime.Port))
if err != nil {
log.Fatal("dialing:", err)
log.Fatalf("Failed to connect to the runtime. Is the runtime running and did you configure the right runtime address (\"%s\")", cfg.Runtime.Host+":"+cfg.Runtime.Port)
}
var reply int