anoia.system print command if it failed

doc-do-over
Daniel Barlow 2023-09-13 17:50:40 +01:00
parent 92e107d77c
commit b3e505abf4
1 changed files with 4 additions and 1 deletions

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