Skip to content

Commit

Permalink
Merge pull request #902 from kamysheblid/main
Browse files Browse the repository at this point in the history
lem-core:config-plist errors out when ~/.lem/config.lisp is empty
  • Loading branch information
cxxxr authored Aug 11, 2023
2 parents f90df69 + 14c6c96 commit 44d193a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/config.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
(defun config-plist ()
(let ((pathname (ensure-config-pathname)))
(if (uiop:file-exists-p pathname)
(uiop:read-file-form pathname)
(uiop:read-file-forms pathname)
'())))

(defun config (key &optional default)
(let ((plist (config-plist)))
(getf plist key default)))
(if (car plist)
(getf (car plist) key default))))


(defun (setf config) (value key &optional default)
(declare (ignore default))
Expand Down

0 comments on commit 44d193a

Please sign in to comment.