From b3e505abf490389cd5188fd300808c46242de778 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Wed, 13 Sep 2023 17:50:40 +0100 Subject: [PATCH] anoia.system print command if it failed --- pkgs/anoia/init.fnl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/anoia/init.fnl b/pkgs/anoia/init.fnl index e9d2ca9..935ab02 100644 --- a/pkgs/anoia/init.fnl +++ b/pkgs/anoia/init.fnl @@ -14,7 +14,10 @@ f (do (f:close) true) _ false)) -(fn system [s] (assert (os.execute s))) +(fn system [s] + (match (os.execute s) + res res + (nil err) (error (.. "Error executing \"" s "\" (" err ")")))) (fn hash [str] (accumulate [h 5381