From 3f0f3028321154cbacecd6690833d0e8c805ccd8 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Wed, 28 Feb 2024 11:49:34 -0300 Subject: feat: more informative reports no bad LUA_{INC,LIB}DIR configs --- spec/util/quick.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/util/quick.lua') diff --git a/spec/util/quick.lua b/spec/util/quick.lua index cb4bb4cf..c313f575 100644 --- a/spec/util/quick.lua +++ b/spec/util/quick.lua @@ -347,7 +347,7 @@ function quick.compile(filename, env) write(([=[ ok, err = make_dir(%q) ]=]):format(op.file)) write(([=[ assert.truthy((lfs.attributes(%q) or {}).mode == "directory", error_message(%d, "MKDIR failed: " .. %q .. " - " .. (err or "") )) ]=]):format(op.file, op.line, op.file)) elseif op.op == "RUN" then - local cmd_helper = cmd_helpers[op.program] or op.program + local cmd_helper = cmd_helpers[op.program] or ("%q"):format(op.program) local redirs = " 1>stdout.txt 2>stderr.txt " write(([=[ local ok, _, code = os.execute(%s .. " " .. %q .. %q) ]=]):format(cmd_helper, op.args, redirs)) write([=[ if type(ok) == "number" then code = (ok >= 256 and ok / 256 or ok) end ]=]) -- cgit v1.2.3-55-g6feb