commit 83ca86fe4225dbc12d3cb8ce924ab08432f6bd82
parent 1b4106e2a3066f6647703f79ecfa385c4e822923
Author: Daniel Barlow <dan@telent.net>
Date: Sun, 25 Aug 2024 15:59:24 +0100
keys in service output tree are strings
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pkgs/watch-ssh-keys/watch-ssh-keys.fnl b/pkgs/watch-ssh-keys/watch-ssh-keys.fnl
@@ -13,7 +13,8 @@
(when (not (table= old-tree new-tree))
(each [username pubkeys (pairs new-tree)]
(with-open [f (assert (io.open (.. path "/" username) :w))]
- (each [_ k (ipairs pubkeys)]
+ ;; the keys are "1" "2" "3" etc, so pairs not ipairs
+ (each [_ k (pairs pubkeys)]
(f:write k)
(f:write "\n")))))
(each [k v (pairs old-tree)]