aboutsummaryrefslogtreecommitdiff
path: root/src/property/file.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-06-18 09:18:42 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-06-18 09:18:42 -0700
commit5e304508e8708e7085c0dd5aad2f5f6f0ed5fc7b (patch)
tree35c60391976a7f088509f51ac9b6a1d4479ecce1 /src/property/file.lisp
parent8d84ba3188005c1959b79f8f355944ee5e911de7 (diff)
downloadconsfigurator-5e304508e8708e7085c0dd5aad2f5f6f0ed5fc7b.tar.gz
FILE:CONTAINS-CONF-EQUALS: improve :PARSE-KV regexp
Make whitespace either side of equals sign optional, and accept empty values. This is needed to use this property to manage Postfix's main.cf file. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property/file.lisp')
-rw-r--r--src/property/file.lisp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/property/file.lisp b/src/property/file.lisp
index 0148d2c..c3973c3 100644
--- a/src/property/file.lisp
+++ b/src/property/file.lisp
@@ -387,7 +387,7 @@ commented out; the first commented or uncommented line for each key will be
uncommented and used to set the value, if it exists."
(:desc (format nil "~A has ~{~A = ~A~^, ~}" file pairs))
(:apply (simple-conf-update file pairs
- :parse-kv #?/^(\S+) = (.+)/
+ :parse-kv #?/^(\S+)\s?=\s?(.*)/
:new-kv (lambda (k v) #?"${k} = ${v}"))))
(defprop contains-conf-shell :posix (file &rest pairs)