diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-04-01 17:48:19 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-04-01 17:52:40 -0700 |
commit | 3d66b5420d42c47ba0c9b33e97d5ced79ce6dd3e (patch) | |
tree | 16abf5aa056b69161d554e665dc0e31c1735cd1f /src/property | |
parent | 19f5faefae7182575f6fce7a1060edf0c5342569 (diff) | |
download | consfigurator-3d66b5420d42c47ba0c9b33e97d5ced79ce6dd3e.tar.gz |
FILE:HAS-CONTENT: accept NIL content & check type of list elements
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property')
-rw-r--r-- | src/property/file.lisp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/property/file.lisp b/src/property/file.lisp index d9ca42a..02efb51 100644 --- a/src/property/file.lisp +++ b/src/property/file.lisp @@ -39,7 +39,12 @@ CONTENT can be a list of lines or a single string." (apply #'maybe-writefile-string path (etypecase content - (cons (unlines content)) + (list + ;; Within a DEFPROPSPEC it is easy to accidentally pass a + ;; quoted list to this property. Error rather than write + ;; the quoted list into the remote file. + (assert (every #'stringp content)) + (unlines content)) (string (format nil "~A~&" content))) (and mode-supplied-p `(:mode ,mode))))) |