commands/operator-sdk: Add better error message when dep is not installed or not in path
Fix
@@ -161,6 +161,10 @@ func execCmd(stdout *os.File, cmd string, args ...string) {
}
func pullDep() {
+ _, err := exec.LookPath(dep)
+ if err != nil {
+ cmdError.ExitWithError(cmdError.ExitError, fmt.Errorf("Looking for dep in $PATH: %v", err))
+ }
fmt.Fprintln(os.Stdout, "Run dep ensure ...")
execCmd(os.Stdout, dep, ensureCmd, "-v")
fmt.Fprintln(os.Stdout, "Run dep ensure done")
