Skip to content

Commit 44d193a

Browse files
authored
Merge pull request #902 from kamysheblid/main
lem-core:config-plist errors out when ~/.lem/config.lisp is empty
2 parents f90df69 + 14c6c96 commit 44d193a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/config.lisp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
1616
(defun config-plist ()
1717
(let ((pathname (ensure-config-pathname)))
1818
(if (uiop:file-exists-p pathname)
19-
(uiop:read-file-form pathname)
19+
(uiop:read-file-forms pathname)
2020
'())))
2121

2222
(defun config (key &optional default)
2323
(let ((plist (config-plist)))
24-
(getf plist key default)))
24+
(if (car plist)
25+
(getf (car plist) key default))))
26+
2527

2628
(defun (setf config) (value key &optional default)
2729
(declare (ignore default))

0 commit comments

Comments
 (0)