fix: give better error message on server create
continuous-integration/drone/push Build is failing Details

This commit is contained in:
decentral1se 2021-09-22 08:19:28 +02:00
parent 886009975d
commit 1392afc015
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package server
import (
"context"
"os/user"
"strings"
"coopcloud.tech/abra/cli/internal"
"coopcloud.tech/abra/pkg/client"
@ -79,7 +80,11 @@ All communication between Abra and the server will use this SSH connection.
}
if _, err := cl.Info(ctx); err != nil {
logrus.Fatalf("unable to make a connection to '%s'?", domainName)
if strings.Contains(err.Error(), "command not found") {
logrus.Fatalf("docker is not installed on '%s'?", domainName)
} else {
logrus.Fatalf("unable to make a connection to '%s'?", domainName)
}
logrus.Debug(err)
}