X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c02ceff00fce94ec5794b53fe890f681acf31121..cdaca3963cf2d07e81eb71ac33e4c0966dec9b93:/lib/cli/external.go diff --git a/lib/cli/external.go b/lib/cli/external.go index ba85aae9ea..35933f99fc 100644 --- a/lib/cli/external.go +++ b/lib/cli/external.go @@ -92,8 +92,33 @@ func (ec externalCmd) RunCommand(prog string, args []string, stdin io.Reader, st } fmt.Fprintf(stderr, "%s failed: %s\n", ec.prog, err) return 1 + case *exec.Error: + fmt.Fprintln(stderr, err) + if ec.prog == "arv" || ec.prog == "arv-run-pipeline-instance" { + fmt.Fprint(stderr, rubyInstallHints) + } else if strings.HasPrefix(ec.prog, "arv-") { + fmt.Fprint(stderr, pythonInstallHints) + } + return 1 default: fmt.Fprintf(stderr, "error running %s: %s\n", ec.prog, err) return 1 } } + +var ( + rubyInstallHints = ` +Note: This subcommand uses the arvados-cli Ruby gem. If that is not +installed, try "gem install arvados-cli", or see +https://doc.arvados.org/install for more details. + +` + pythonInstallHints = ` +Note: This subcommand uses the "arvados" Python module. If that is +not installed, try: +* "pip install arvados" (either as root or in a virtualenv), or +* "sudo apt-get install python-arvados-python-client", or +* see https://doc.arvados.org/install for more details. + +` +)