diff --git a/containers/types.go b/containers/types.go index 8b18c07..0e651ac 100644 --- a/containers/types.go +++ b/containers/types.go @@ -1,6 +1,7 @@ package containers import ( + "bytes" "errors" "fmt" "log" @@ -273,7 +274,7 @@ func (c *Container) GetDeploySSHKeys() (string, string, error) { return "", "", err } - if privateKey != nil || pubKey != nil { + if privateKey != nil && pubKey != nil && !bytes.Contains(*privateKey, []byte("No such file")) && !bytes.Contains(*pubKey, []byte("No such file")) { return string(*privateKey), string(*pubKey), nil }