diff options
-rw-r--r-- | src/property/file.lisp | 11 |
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 |