fix: check that docker is installed on local add
This commit is contained in:
parent
c1390f232e
commit
5be190e110
|
@ -3,6 +3,7 @@ package server
|
|||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"os/exec"
|
||||
"os/user"
|
||||
"strings"
|
||||
|
||||
|
@ -69,6 +70,9 @@ All communication between Abra and the server will use this SSH connection.
|
|||
if err := server.CreateServerDir(domainName); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
if _, err := exec.LookPath("docker"); err != nil {
|
||||
return errors.New("docker command not found on $PATH, is it installed?")
|
||||
}
|
||||
logrus.Info("local server has been added")
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue