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 (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
"os/exec"
|
||||||
"os/user"
|
"os/user"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -69,6 +70,9 @@ All communication between Abra and the server will use this SSH connection.
|
|||||||
if err := server.CreateServerDir(domainName); err != nil {
|
if err := server.CreateServerDir(domainName); err != nil {
|
||||||
logrus.Fatal(err)
|
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")
|
logrus.Info("local server has been added")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user