diff --git a/README.md b/README.md index 6d9e93d..50002a4 100644 --- a/README.md +++ b/README.md @@ -63,5 +63,5 @@ Creating the Alfred node image is done using [Packer](https://www.packer.io/) in - bash - docker -- tar +- ssh - zstd diff --git a/client/main.go b/client/main.go index 5eaf9a3..1d1f0dd 100644 --- a/client/main.go +++ b/client/main.go @@ -5,6 +5,7 @@ import ( "fmt" "net" "os" + "os/exec" "strings" "github.com/fatih/color" @@ -33,6 +34,12 @@ var alfredCmd = &cobra.Command{ SilenceErrors: true, PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) { + dependencies := []string{"bash", "docker", "ssh", "zstd"} + command := exec.Command("/bin/which", dependencies...) + if err := command.Run(); err != nil { + return fmt.Errorf("missing mandatory dependencies (%s): %w", strings.Join(dependencies, ", "), err) + } + defer func() { if err != nil { err = fmt.Errorf("failed to connect to gRPC client: %w", err)