Closed andr-ew closed 1 year ago
Thank you very much! I tweaked it to support keeping script_file
in ~/seamstress
and took the opportunity to clean up how the Zig function do_call
will react to the errors that are emitted, in anticipation of switching from printing to logging in #24. Very much appreciate your easy fix :)
I noticed that
pcall
appeared to be capturing any (user-caused) errors that occurred in the main body ofscript.lua
(or any files called at the top w/dofile
), rather than printing them in the REPL, which caused some momentary confusion for me.since the nature of that check & error messages appeared to be more about checking for the existence of the file, regardless of error-free-ness, I tried just dogfooding off of
util.exists
and using a non-protectedrequire
only if the file exists.not totally sure if this was a bug or intended behavior, but regardless, this new behavior matches my personal expectations better, at least :)