forked from toolshed/abra
fix: more robust docker context problem handling
See coop-cloud/organising#325 See coop-cloud/organising#340
This commit is contained in:
@ -6,6 +6,7 @@ import (
|
||||
"net"
|
||||
"net/url"
|
||||
|
||||
ctxPkg "coopcloud.tech/abra/pkg/context"
|
||||
sshPkg "coopcloud.tech/abra/pkg/ssh"
|
||||
"github.com/docker/cli/cli/connhelper"
|
||||
"github.com/docker/cli/cli/connhelper/ssh"
|
||||
@ -36,6 +37,10 @@ func getConnectionHelper(daemonURL string, sshFlags []string) (*connhelper.Conne
|
||||
return nil, errors.Wrap(err, "ssh host connection is not valid")
|
||||
}
|
||||
|
||||
if err := ctxPkg.HasDockerContext(ctxConnDetails.Host); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err := sshPkg.EnsureHostKey(ctxConnDetails.Host); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user