refactor: named note, merge if clause
This commit is contained in:
@ -48,10 +48,9 @@ func New(serverName string, opts ...Opt) (*client.Client, error) {
|
||||
return nil, errors.New(i18n.G("server missing, run \"abra server add %s\"?", serverName))
|
||||
}
|
||||
|
||||
// When the docker context does not exist but the server folder is
|
||||
// there, let's create a new docker context.
|
||||
err = CreateContext(serverName)
|
||||
if err != nil {
|
||||
// NOTE(p4u1): when the docker context does not exist but the server folder
|
||||
// is there, let's create a new docker context.
|
||||
if err = CreateContext(serverName); err != nil {
|
||||
return nil, errors.New(i18n.G("server missing context, context creation failed: %s", err))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user