From 7173b6fb1c883a90d27f0cc69d5feac4b6663069 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Tue, 5 Mar 2024 19:43:42 +0000 Subject: [PATCH] don't call os.exit --- pkgs/ifwait/ifwait.fnl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/ifwait/ifwait.fnl b/pkgs/ifwait/ifwait.fnl index f49398b..70194eb 100644 --- a/pkgs/ifwait/ifwait.fnl +++ b/pkgs/ifwait/ifwait.fnl @@ -30,8 +30,7 @@ _ {})] - (when (. got params.expecting) - (os.exit 0)))) + (. got params.expecting))) (fn run [event-fn] (let [parameters @@ -41,8 +40,9 @@ (print (.. (. arg 0) ": waiting for " parameters.link " to be " parameters.expecting))) - (each [event (event-fn)] - (run-event parameters event)))) + (each [e (event-fn) + &until (run-event parameters e)] + true))) (when (not (= (. arg 0) "test")) (run #(nl.events {:link true})))