From 83ca86fe4225dbc12d3cb8ce924ab08432f6bd82 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sun, 25 Aug 2024 15:59:24 +0100 Subject: [PATCH] keys in service output tree are strings --- pkgs/watch-ssh-keys/watch-ssh-keys.fnl | 3 ++- 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 index a38f525..618a2b9 100644 --- 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)]