File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 50
50
([path] (some->> (parent-dirs path) (some find-config-file-in-dir))))
51
51
52
52
(defn- directory? [path]
53
- (.isDirectory ( .getAbsoluteFile ( io/file path)) ))
53
+ (some-> path io/file .getAbsoluteFile .isDirectory ))
54
54
55
55
(defn load-config
56
56
" Load a configuration merged with a map of sensible defaults. May take
57
57
an path to a config file, or to a directory to search. If no argument
58
58
is supplied, it uses the current directory. See: [[find-config-file]]."
59
59
([] (load-config " " ))
60
60
([path]
61
- (merge default-config (if (directory? path)
62
- (some-> (find-config-file path) read-config)
63
- (read-config path)))))
61
+ (let [path (if (directory? path)
62
+ (find-config-file path)
63
+ path)]
64
+ (merge default-config (some-> path read-config)))))
You can’t perform that action at this time.
0 commit comments