Browse files

More robust configuration file opening for core/-main.

  • Loading branch information...
aroemers committed Oct 26, 2012
1 parent 5b9bb6e commit 41b67efe80817f5c819f6829f6b48912274b58b6
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/gluer/core.clj
@@ -101,7 +101,9 @@
(if help
(display-help-text banner)
(if-let [config-file-name (first args)]
- (let [config (c/read-config (slurp config-file-name))]
+ (if-let [config (try (c/read-config (slurp config-file-name))
+ (catch ioe))]
(with-redefs [*verbose* (or verbose (and (nil? verbose) (:verbose config)))]
- (check (:glue config))))
+ (check (:glue config)))
+ (println "Could not find or open file:" config-file-name))
(display-help-text banner)))))

0 comments on commit 41b67ef

Please sign in to comment.