}
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.
+
+`
+)