From 0c0d0eed8af3f2002b60ca49c0d4bcbf841daee8 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Tue, 3 Sep 2024 22:51:29 +0100 Subject: [PATCH] make watch-ssh-keys robust against missing key --- pkgs/watch-ssh-keys/watch-ssh-keys.fnl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/watch-ssh-keys/watch-ssh-keys.fnl b/pkgs/watch-ssh-keys/watch-ssh-keys.fnl index 618a2b9..e123843 100644 --- a/pkgs/watch-ssh-keys/watch-ssh-keys.fnl +++ b/pkgs/watch-ssh-keys/watch-ssh-keys.fnl @@ -52,9 +52,9 @@ (let [{: out-path : watched-service : path } (parse-args arg) dir (.. watched-service "/.outputs") service (assert (svc.open dir))] - (accumulate [tree (service:output path) + (accumulate [tree (or (service:output path) {}) v (service:events)] - (write-changes out-path tree (service:output path))))) + (write-changes out-path tree (or (service:output path) {}))))) { : run }