mirror of
https://github.com/roswell/roswell.git
synced 2026-09-10 07:16:17 -04:00
roswell.util:config returns nil when the value is empty.
This commit is contained in:
parent
9d33814fc1
commit
90980a217c
|
|
@ -56,7 +56,7 @@ exec ros +R +Q -m roswell -L sbcl-bin -- $0 "$@"
|
|||
(setf conf (config conf (second argv) (third argv)))
|
||||
(save-config path conf) 0)
|
||||
((and (equal (first argv) "show") (= 2 len))
|
||||
(format t "~A~%" (third (find (second argv) conf :test 'equal :key #'first))) 0)
|
||||
(format t "~A~%" (or (third (find (second argv) conf :test 'equal :key #'first)) "")) 0)
|
||||
((= 2 len)
|
||||
(setf conf (config conf (first argv) (second argv)))
|
||||
(save-config path conf) 0)
|
||||
|
|
|
|||
|
|
@ -115,7 +115,8 @@
|
|||
(roswell:roswell `("roswell-internal-use" "core-extention" ,impl) :string t))
|
||||
|
||||
(defun config (c)
|
||||
(roswell:roswell `("config" "show" ,c) :string t))
|
||||
(let ((result (roswell:roswell `("config" "show" ,c) :string t)))
|
||||
(unless (zerop (length result)) result)))
|
||||
|
||||
(defun (setf config) (val item)
|
||||
(roswell:roswell `("config" "set" ,item ,val) :string t)
|
||||
|
|
|
|||
Loading…
Reference in a new issue