aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-02-24 10:47:12 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-02-24 10:47:12 -0700
commita8a666f045ab7a5966d11cb2eac12ef099f23960 (patch)
tree8215f5b35ad5f90f3eef214929b00aacf1511365
parente1cd02dcf52fe9a2099748753c2948424d6a05f9 (diff)
downloadconsfigurator-a8a666f045ab7a5966d11cb2eac12ef099f23960.tar.gz
fix FILE:CONTAINS-LINES
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/property/file.lisp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/property/file.lisp b/src/property/file.lisp
index 6096377..c3eaab5 100644
--- a/src/property/file.lisp
+++ b/src/property/file.lisp
@@ -23,11 +23,12 @@
(defprop contains-lines :posix (path lines)
"Ensure there is a file at PATH containing each of LINES once."
- (:apply (let ((new-lines (copy-list lines))
- (existing-lines (lines (readfile path))))
- (dolist (existing-line existing-lines)
- (deletef new-lines existing-line))
- (writefile path (unlines (nconc existing-lines new-lines))))))
+ (:apply
+ (let ((new-lines (copy-list lines))
+ (existing-lines (lines (readfile path))))
+ (dolist (existing-line existing-lines)
+ (deletef new-lines existing-line :test #'string=))
+ (writefile path (unlines (nconc existing-lines new-lines))))))
(defprop data-uploaded :posix (iden1 iden2 destination)
(:hostattrs