anoia.system print command if it failed

This commit is contained in:
Daniel Barlow 2023-09-13 17:50:40 +01:00
parent 92e107d77c
commit b3e505abf4

View file

@ -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