fix: check that docker is installed on local add

This commit is contained in:
decentral1se 2021-10-17 23:50:28 +02:00
parent c1390f232e
commit 5be190e110
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 4 additions and 0 deletions

View File

@ -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
}