       (let [{:keys [options arguments errors summary]}
             (parse-opts args (concat
                               (:cli subcmd-cli)
-                              [["-h" "--help"]]))]
+                              [["-h" "--help" "Print this help page"]]))]
         (cond
           (:help options) (exit 0 (usage summary :sub-command subcommand))
-          errors (exit 1 (usage summary :sub-command subcommand)))
+          errors (exit 1 (string/join
+                          \newline
+                          [(error-msg errors :sub-command subcommand)
+                          ""
+                          (usage summary :sub-command subcommand)
+                          ""])))
         ((:function subcmd-cli)
          (merge
           (edn/read-string

  `(let [x# ~body]
     (println "dbg:" '~body "=" x#)
x#))

(defn- generate-repo-index!
  [options arguments]

(ns degasolv.cli
  (:require [degasolv.util :refer :all]
            [clojure.tools.cli :refer [parse-opts summarize]]
            [clojure.string :as string]
            [clojure.pprint :as pprint]
            [clojure.java.io :as io]
