Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Commandline option --verbose/--no-verbose now overwrites the configur…

…ation file.
  • Loading branch information...
commit 5b9bb6eeaf68480e2207b5528d78e153d3085b4b 1 parent 6653073
@aroemers authored
Showing with 6 additions and 5 deletions.
  1. +2 −2 src/gluer/config.clj
  2. +4 −3 src/gluer/core.clj
View
4 src/gluer/config.clj
@@ -1,4 +1,4 @@
-;;;; Summary: Reading the configuration files.
+;;;; Summary: Reading configuration files.
;;;; Author: Arnout Roemers
;;;;
;;;; This namespace contains the functions to read the configuration text that
@@ -55,7 +55,7 @@
config {}]
(if-let [line (first lines)]
(let [splitted (split line #"\s*:\s*" 2)]
- (if (< 1 (count splitted))
+ (if (= 2 (count splitted))
(let [[key value] splitted]
(recur (rest lines) (handle (trim key) value config)))
(recur (rest lines) config)))
View
7 src/gluer/core.clj
@@ -43,8 +43,9 @@
(println (format help-text-format (clojure.string/replace cli-banner "Usage:\n" ""))))
(def commandline-opts
- [["-h" "--help" "Print this help." :flag true]
- ["-v" "--verbose" "Be verbose in output." :flag true]])
+ [["-h" "--help" "Print this help." :flag true]
+ ["-v" "--verbose" "Be verbose in output. Overwrites the setting in the configuration file."
+ :flag true :default nil]])
;;; The functions that direct the checking.
@@ -101,6 +102,6 @@
(display-help-text banner)
(if-let [config-file-name (first args)]
(let [config (c/read-config (slurp config-file-name))]
- (with-redefs [*verbose* (or verbose (:verbose config))]
+ (with-redefs [*verbose* (or verbose (and (nil? verbose) (:verbose config)))]
(check (:glue config))))
(display-help-text banner)))))
Please sign in to comment.
Something went wrong with that request. Please try again.