forked from toolshed/abra
		
	fix: check that docker is installed on local add
This commit is contained in:
		| @ -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 | ||||
| 		} | ||||
|  | ||||
		Reference in New Issue
	
	Block a user